From 9aba90b30f4c3888ed9d5ae89c008b08ac4ec724 Mon Sep 17 00:00:00 2001 From: Jerome Lebleu Date: Tue, 17 Dec 2013 21:49:20 +0100 Subject: [PATCH] Prevent EOFError while updating stats with cron jobs --- yunohost_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yunohost_monitor.py b/yunohost_monitor.py index bbc57ced..ed4f7db1 100644 --- a/yunohost_monitor.py +++ b/yunohost_monitor.py @@ -362,8 +362,8 @@ def monitor_enable(no_stats=False): 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' + \ - '0 */4 * * * root %(cmd)s month --no-ldap >> /dev/null') % {'cmd': cmd} + '3 * * * * root %(cmd)s week --no-ldap >> /dev/null\n' + \ + '6 */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))