https://github.com/youpy/ruby-launch-agent
A library to use launchd easily
https://github.com/youpy/ruby-launch-agent
Last synced: 5 days ago
JSON representation
A library to use launchd easily
- Host: GitHub
- URL: https://github.com/youpy/ruby-launch-agent
- Owner: youpy
- License: mit
- Created: 2010-09-05T16:33:01.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2015-06-05T06:13:42.000Z (about 11 years ago)
- Last Synced: 2023-04-10T11:22:14.851Z (about 3 years ago)
- Language: Ruby
- Homepage:
- Size: 207 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE
Awesome Lists containing this project
README
= ruby-launch-agent
A library to use launchd easily
== Synopsis
require 'launch_agent'
agent = LaunchAgent::Daemon.new('ruby', '/path/to/foo.rb', 'arg1', 'arg2')
# load
agent.load
# unload
agent.unload
== CLI
% launchagent -h
Usage:
launchagent [--env=] (--daemon | --interval ) [--wdir=] [--stdout=] [--stderr=] (...)
launchagent -h | --help
Options:
-h --help Show this screen.
-v --version Show version information.
-e --env= Additional environmental variables to be set before running the job. Can specify multiple value with comma. e.g. FOO=bar,BAR=baz
-w --wdir= Specify a directory to chdir(2) to before running the job
-d --daemon Load as daemon. If it is set, --interval option is ignored
-i --interval= Causes the job to be started every N seconds
-o --stdout= Specify what file should be used for data being sent to stdout when using stdio(3)
-r --stderr= Specify what file should be used for data being sent to stderr when using stdio(3)
== Note on Patches/Pull Requests
* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.
== Copyright
Copyright (c) 2010 youpy. See LICENSE for details.