How to run rake resque: scheduler in daemon mode

I am using resque: gem scheduler in my rails 3 application .

How to run rake resque:schedulerin daemonmode.

and if you know, then please let me know

How to configure this task in a GOD script?

+5
source share
4 answers

I think you only need to do this.

BACKGROUND=yes rake resque:scheduler 

and maybe this will work on here

Hope for this help

+4
source
PIDFILE=./resque-scheduler.pid BACKGROUND=yes rake resque:scheduler

full resque planner document available here

+1
source

rake resque:scheduler BACKGROUND=true

rake resque:scheduler &

, rake, nohup

nohup rake my:task BACKGROUND=true
0

: 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
0
source

All Articles