Skip to content

Commit

Permalink
schedule: cron updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ndushay committed May 31, 2018
1 parent f1affaf commit 58197b8
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions config/schedule.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Use this file to easily define all of your cron jobs.
# Learn more: http://github.com/javan/whenever

# run this task only on servers with the :m2c role in Capistrano
every '0 5 1-7,15-21 * Sat', roles: [:m2c] do
# append to existing logs
# run these task only on servers with the correct roles in Capistrano
# these tasks append to existing logs
every '0 5 1-7 * 6', roles: [:m2c] do
set :output, standard: 'log/m2c.log', error: 'log/m2c-err.log'
rake 'm2c_exist_all_storage_roots'
end
every '0 5 15-21 * 6', roles: [:m2c] do
set :output, standard: 'log/m2c.log', error: 'log/m2c-err.log'
rake 'm2c_exist_all_storage_roots'
end

# run this task only on servers with the :c2m role in Capistrano
every '0 5 8-14,22-28 * Sat', roles: [:c2m] do
# append to existing logs
every '0 5 8-14 * 6', roles: [:c2m] do
set :output, standard: 'log/c2m.log', error: 'log/c2m-err.log'
rake "c2m_check_version_all_dirs[`date --date='7 days ago' --iso-8601=s`]"
end
every '0 5 22-28 * 6', roles: [:c2m] do
set :output, standard: 'log/c2m.log', error: 'log/c2m-err.log'
rake "c2m_check_version_all_dirs[`date --date='7 days ago' --iso-8601=s`]"
end

0 comments on commit 58197b8

Please sign in to comment.