Skip to content

Instantly share code, notes, and snippets.

@keitaj
Created March 12, 2015 03:15
Show Gist options
  • Save keitaj/a3a45a613fe9a11b2d6a to your computer and use it in GitHub Desktop.
Save keitaj/a3a45a613fe9a11b2d6a to your computer and use it in GitHub Desktop.
wheneverでのスケジュール設定サンプル。/config/schedule.rb。crontabを更新するコマンド。bundle exec whenever --update-crontab
every 1.day, at: '15:01 pm' do
runner 'Tasks::CreateSummaryReport.execute', output: 'log/cron.log'
end
every(1.day, at: '0:07 am') { runner 'Tasks::CreateDetailReports.new.execute', output: 'log/cron.log' }
every 1.hours do
runner 'Tasks::CreateSummaryReport.execute', output: 'log/cron.log'
end
every '20 * * * *' do
runner 'Tasks::CreateSummaryReport.execute', output: 'log/cron.log'
end
every 1.day, at: '1:12 am' do
runner 'Tasks::CreateSummaryReport.execute', output: 'log/cron.log'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment