summaryrefslogtreecommitdiff
path: root/manifests/cron
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2010-12-11 15:08:17 +0100
committerintrigeri <intrigeri@boum.org>2010-12-11 15:17:41 +0100
commitfad111e036d06b9d7bce163b2f888c5d337c4089 (patch)
treec7b1e00b7e926ffa00258e5795f738792ad5b453 /manifests/cron
parent874da52745d7f9c34976a9e05292a92bb449e803 (diff)
Allow running cron-apt more than once a day.
Diffstat (limited to 'manifests/cron')
-rw-r--r--manifests/cron/base.pp16
1 files changed, 16 insertions, 0 deletions
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp
index de55772..7ccfce6 100644
--- a/manifests/cron/base.pp
+++ b/manifests/cron/base.pp
@@ -1,4 +1,20 @@
class apt::cron::base {
package { cron-apt: ensure => installed }
+
+ case $apt_cron_hours {
+ '': {}
+ default: {
+ # cron-apt defaults to run every night at 4 o'clock
+ # so we try not to run at the same time.
+ cron { 'apt_cron_every_N_hours':
+ command => 'test -x /usr/sbin/cron-apt && /usr/sbin/cron-apt',
+ user => root,
+ hour => "${apt_cron_hours}",
+ minute => 10,
+ require => Package['cron-apt'],
+ }
+ }
+ }
+
}