From 579f3324bd06f59e797aa6457be82f470407c4fa Mon Sep 17 00:00:00 2001 From: Jerome Lebleu Date: Tue, 17 Dec 2013 18:39:23 +0100 Subject: [PATCH] Fix cron job schedule for monitoring --- yunohost_monitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yunohost_monitor.py b/yunohost_monitor.py index 05d07eb1..bbc57ced 100644 --- a/yunohost_monitor.py +++ b/yunohost_monitor.py @@ -360,9 +360,10 @@ def monitor_enable(no_stats=False): # Install crontab if not no_stats: cmd = 'yunohost monitor update-stats' + # day: every 5 min # week: every 1 h # month: every 4 h # rules = ('*/5 * * * * root %(cmd)s day --no-ldap >> /dev/null\n' + \ '0 * * * * root %(cmd)s week --no-ldap >> /dev/null\n' + \ - '* */4 * * * root %(cmd)s month --no-ldap >> /dev/null') % {'cmd': cmd} + '0 */4 * * * root %(cmd)s month --no-ldap >> /dev/null') % {'cmd': cmd} os.system("touch %s" % crontab_path) os.system("echo '%s' >%s" % (rules, crontab_path))