Compare commits

..

4 Commits

Author SHA1 Message Date
Dzmitry Plashchynski
fa69ed0fd9 Bump version to 1.0.0 2016-03-30 16:41:31 +03:00
Dzmitry Plashchynski
95d8e13563 Update gems 2016-03-30 16:40:29 +03:00
Dzmitry Plashchynski
63283509cb Update gems 2016-01-29 18:08:14 +02:00
Dzmitry Plashchynski
16ca450033 Fix option parser 2016-01-20 20:41:26 +02:00
4 changed files with 36 additions and 21 deletions

View File

@@ -1,21 +1,21 @@
PATH
remote: .
specs:
crono (1.0.0.pre2)
crono (1.0.0)
activerecord (~> 4.0)
activesupport (~> 4.0)
GEM
remote: https://rubygems.org/
specs:
activemodel (4.2.5)
activesupport (= 4.2.5)
activemodel (4.2.6)
activesupport (= 4.2.6)
builder (~> 3.1)
activerecord (4.2.5)
activemodel (= 4.2.5)
activesupport (= 4.2.5)
activerecord (4.2.6)
activemodel (= 4.2.6)
activesupport (= 4.2.6)
arel (~> 6.0)
activesupport (4.2.5)
activesupport (4.2.6)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
@@ -23,14 +23,14 @@ GEM
tzinfo (~> 1.1)
arel (6.0.3)
builder (3.2.2)
byebug (8.2.1)
byebug (8.2.2)
daemons (1.2.3)
diff-lcs (1.2.5)
haml (4.0.7)
tilt
i18n (0.7.0)
json (1.8.3)
minitest (5.8.3)
minitest (5.8.4)
rack (1.6.4)
rack-protection (1.5.3)
rack
@@ -41,7 +41,7 @@ GEM
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.1)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
@@ -50,8 +50,8 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
sinatra (1.4.6)
rack (~> 1.4)
sinatra (1.4.7)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sqlite3 (1.3.11)

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.pre2'
VERSION = '1.0.0'
end