mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-23 09:51:48 +01:00
add documentation and fix --help
This commit is contained in:
@@ -132,12 +132,13 @@ To run Crono daemon, in your Rails project root directory:
|
||||
|
||||
crono usage:
|
||||
```
|
||||
Usage: crono [options]
|
||||
Usage: crono [options] start|stop|restart|run
|
||||
-C, --cronotab PATH Path to cronotab file (Default: config/cronotab.rb)
|
||||
-L, --logfile PATH Path to writable logfile (Default: log/crono.log)
|
||||
-P, --pidfile PATH Path to pidfile (Default: tmp/pids/crono.pid)
|
||||
-d, --[no-]daemonize Daemonize process (Default: false)
|
||||
-e, --environment ENV Application environment (Default: development)
|
||||
--piddir PATH Path to piddir (Default: tmp/pids)
|
||||
-N, --process_name name Name of the process (Default: crono)
|
||||
-m, --monitor Start monitor process for a deamon (Default false)
|
||||
-e, --environment ENV Application environment (Default: development)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ module Crono
|
||||
config.logfile = logfile
|
||||
end
|
||||
|
||||
opts.on("-P", "--pidfile PATH", "Path to pidfile (Default: #{config.pidfile})") do |pidfile|
|
||||
opts.on("-P", "--pidfile PATH", "Deprecated! use --piddir with --process_name; Path to pidfile (Default: #{config.pidfile})") do |pidfile|
|
||||
config.pidfile = pidfile
|
||||
end
|
||||
|
||||
@@ -140,7 +140,7 @@ module Crono
|
||||
config.piddir = piddir
|
||||
end
|
||||
|
||||
opts.on("-N", "--process_name name", "Name of the process (Default: #{config.process_name})") do |process_name|
|
||||
opts.on("-N", "--process_name NAME", "Name of the process (Default: #{config.process_name})") do |process_name|
|
||||
config.process_name = process_name
|
||||
end
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ module Crono
|
||||
def initialize
|
||||
self.cronotab = CRONOTAB
|
||||
self.logfile = LOGFILE
|
||||
@pidfile = PIDFILE
|
||||
self.piddir = PIDDIR
|
||||
self.process_name = PROCESS_NAME
|
||||
self.daemonize = false
|
||||
|
||||
Reference in New Issue
Block a user