Skip to content

Running Delayed::Worker as a daemon

eugenebolshakov edited this page Sep 12, 2010 · 3 revisions

Check out the Collective Idea fork of delayed_job for a script to manage the daemon.

An easy way to take the effort out of managing your background worker process is to write a simple wrapper script using the daemons gem. This allows you to do things such as script/worker (start|stop|run|restart) and throws PID management into the mix as well, making it easy to deploy and restart using capistrano.

An example script can be found in the gist below. Simply paste it into a new file in your application’s script folder and give it executable permissions.

Please note that there’s a problem with the daemons gem and most likely restarting the process won’t work. Check this for more details and a workaround.

Something went wrong with that request. Please try again.