mode 0o755
end
-template "/etc/cron.d/nginx-old-cache-cleanup" do
- source "nginx-old-cache-cleanup.cron.erb"
- owner "root"
- group "root"
- mode 0o644
+cron_d "nginx-old-cache-cleanup" do
+ minute "15"
+ hour "23"
+ user "www-data"
+ command "/usr/bin/timeout 6h /usr/local/bin/nginx-old-cache-cleanup"
end
+++ /dev/null
-# Cleanup old nginx cache storage
-15 23 * * * www-data /usr/bin/timeout 6h /usr/local/bin/nginx-old-cache-cleanup
template "apache.erb"
end
-template "/etc/cron.d/piwiki" do
- source "cron.erb"
- owner "root"
- group "root"
- mode "0644"
+cron_d "piwik" do
+ minute "5"
+ user "www-data"
+ command "/usr/bin/php /srv/piwik.openstreetmap.org/console core:archive --quiet --url=https://piwik.openstreetmap.org/"
end
+++ /dev/null
-5 * * * * www-data /usr/bin/php /srv/piwik.openstreetmap.org/console core:archive --quiet --url=https://piwik.openstreetmap.org/
:output_dir => tilelog_output_directory
end
-template "/etc/cron.d/tilelog" do
- source "tilelog.cron.erb"
- owner "root"
- group "root"
- mode 0o644
+cron_d "tilelog" do
+ minute "17"
+ hour "22"
+ user "www-data"
+ command "/usr/local/bin/tilelog"
+ mailto "zerebubuth@gmail.com"
end
# resources related to the output of the analysis and where it
+++ /dev/null
-MAILTO=zerebubuth@gmail.com
-17 22 * * * www-data /usr/local/bin/tilelog
variables :ruby => ruby, :directory => rails_directory
end
-template "/etc/cron.d/statistics" do
- source "statistics.cron.erb"
- owner "root"
- group "root"
- mode 0o644
+cron_d "statistics" do
+ minute "0"
+ hour "0"
+ user "rails"
+ command "/usr/local/bin/statistics"
end
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-0 0 * * * rails /usr/local/bin/statistics
mode "0775"
end
-template "/etc/cron.d/wiki-dump" do
- owner "root"
- group "root"
- mode 0o644
- source "wiki-dump.erb"
- variables :directory => "/srv/wiki.openstreetmap.org"
+cron_d "wiki-dump" do
+ minute "0"
+ hour "2"
+ user "wiki"
+ command "cd /srv/wiki.openstreetmap.org && php w/maintenance/dumpBackup.php --full --quiet --output=gzip:dump/dump.xml.gz"
end
+++ /dev/null
-# DO NOT EDIT - This file is being maintained by Chef
-
-0 2 * * * wiki cd <%= @directory %> && php w/maintenance/dumpBackup.php --full --quiet --output=gzip:dump/dump.xml.gz