Compare commits

...

2 Commits

Author SHA1 Message Date
Dzmitry Plashchynski
16ca450033 Fix option parser 2016-01-20 20:41:26 +02:00
Dzmitry Plashchynski
acbfea2308 Bump 1.0.0.pre2 2016-01-20 16:20:59 +02:00
4 changed files with 25 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
PATH
remote: .
specs:
crono (1.0.0.pre)
crono (1.0.0.pre3)
activerecord (~> 4.0)
activesupport (~> 4.0)

View File

@@ -131,23 +131,38 @@ serialized using JSON.generate
Crono.perform(TestJob, 'some', 'args').every 1.day, at: {hour: 12, min: 15}
```
#### Run daemon
#### Run
To run Crono daemon, in your Rails project root directory:
To run Crono, in your Rails project root directory:
bundle exec crono RAILS_ENV=development
crono usage:
```
Usage: crono [options] start|stop|restart|run
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)
--piddir PATH Path to piddir (Default: tmp/pids)
-N, --process_name name Name of the process (Default: crono)
-P, --pidfile PATH Deprecated! use --piddir with --process_name; Path to pidfile (Default: )
-D, --piddir PATH Path to piddir (Default: tmp/pids)
-N, --process_name NAME Name of the process (Default: crono)
-d, --[no-]daemonize Deprecated! Instead use crono [start|stop|restart] without this option; Daemonize process (Default: false)
-m, --monitor Start monitor process for a deamon (Default false)
-e, --environment ENV Application environment (Default: development)
-e, --environment ENV Application environment (Default: development)
```
#### Run as daemon
To run Crono as daemon, please add to your Gemfile:
```ruby
gem 'daemons'
```
Then:
bundle install; bundle exec crono start RAILS_ENV=development
There are "start", "stop", and "restart" commands.
## Web UI

View File

@@ -122,7 +122,7 @@ module Crono
def parse_options(argv)
@argv = OptionParser.new do |opts|
opts.banner = "Usage: crono [options] start|stop|restart|run"
opts.banner = "Usage: crono [options] [start|stop|restart|run]"
opts.on("-C", "--cronotab PATH", "Path to cronotab file (Default: #{config.cronotab})") do |cronotab|
config.cronotab = cronotab
@@ -136,7 +136,7 @@ module Crono
config.pidfile = pidfile
end
opts.on("--piddir PATH", "Path to piddir (Default: #{config.piddir})") do |piddir|
opts.on("-D", "--piddir PATH", "Path to piddir (Default: #{config.piddir})") do |piddir|
config.piddir = piddir
end

View File

@@ -1,3 +1,3 @@
module Crono
VERSION = '1.0.0.pre'
VERSION = '1.0.0.pre3'
end