msn email google-talk twitter tumblr flickr

whenever usage

put the follow line into the config/environment.rb file

config.gem 'javan-whenever', :lib => false, :source => 'http://gems.github.com'

to install the gem whenever like:

sudo gem install whenever

or

rake gems:install

then to the root of your app,and run

wheneverize .

this will generate the file ‘/config/schedule.rb’ write your logic like this:

   1      every 1.day, :at => '0:00 pm' do
   2        runner "ModelName.class_method"
   3      end

run the under line to write or update the job to the crontab

whenever --update-crontab jobs_name_here --set environment=development

check in the terminal;

crontab -l 查看

crontab -r 删除