mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Prevent EOFError while updating stats with cron jobs
This commit is contained in:
parent
6cc529b21e
commit
9aba90b30f
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue