Skip to content

Instantly share code, notes, and snippets.

@sudara
Created November 9, 2009 11:22
Show Gist options
  • Select an option

  • Save sudara/229881 to your computer and use it in GitHub Desktop.

Select an option

Save sudara/229881 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'daemons'
options = {
:app_name => "task_server",
:dir_mode => :script,
:dir => "../log", # where the log/PID file will be dropped
:ontop => false, # should be false
:mode => :exec,
:backtrace => true,
:log_output => true
}
Daemons.run(File.join(File.dirname(__FILE__), 'task_server.rb'), options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment