From: Matt Amos Date: Mon, 5 Feb 2018 13:51:11 +0000 (+0000) Subject: Run old planet file cleanup on first Monday of the month. X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/3ea17725313548ea7639a3790b446eaf6f965270?ds=sidebyside Run old planet file cleanup on first Monday of the month. Not every Monday and additionally the 1st through 7th, as the previous cron configuration actually meant. Turns out the command runs when either the day of week matches _or_ the day of month matches, unlike all the other rules. --- diff --git a/cookbooks/planet/templates/default/old-planet-file-cleanup.cron.erb b/cookbooks/planet/templates/default/old-planet-file-cleanup.cron.erb index 3871d9dfb..f3983cbdd 100644 --- a/cookbooks/planet/templates/default/old-planet-file-cleanup.cron.erb +++ b/cookbooks/planet/templates/default/old-planet-file-cleanup.cron.erb @@ -1,4 +1,4 @@ # DO NOT EDIT - This file is being maintained by Chef MAILTO=zerebubuth@gmail.com # run this on the first monday of the month at 3:44am -44 3 1-7 * mon www-data /usr/local/bin/old-planet-file-cleanup --dry-run --debug +44 3 1-7 * * www-data test $(date +\%u) -eq 1 && /usr/local/bin/old-planet-file-cleanup --dry-run --debug