jamesfwz
6/17/2014 - 9:16 AM

Whenever.md

This gem makes creating cron jobs very easy!

  • Source: https://github.com/javan/whenever
  • After defining your crons, you need to run whenever -w to write out the crontab
  • Use crontab -l to see the list of cron jobs you have

Sample schedule.rb

set :output, {:standard => 'log/cron.log'} #logs to your log file to view

every 1.day, :at => '12:05 am' do
  runner "Notifier.run_send_reminder_emails(host: 'example.com')"
end