: resque-schedular God script.
gem install god
watch.god .
Add the following code to watch.god
God.watch do |w|
w.name = "resque_schedular"
w.dir = '/home/machine_name/project_path'
w.start = "BACKGROUND=yes bundle exec rake environment resque:scheduler"
w.keepalive
end
Run god in terminal for testing
$ god -c path/to/watch.god -D
Run god in daemon (background) from terminal
$ god -c path/to/watch.god
source
share