Don't launch cron jobs when systemd is running

This commit is contained in:
Xavier Guimard 2019-05-20 18:03:36 +02:00
parent 78e50ac855
commit e77e2c1261
2 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,5 @@
#
# Regular cron jobs for LemonLDAP::NG Handler
# Regular cron jobs for the Lemonldap::NG handler
# Launched only if systemd isn't running
#
1 * * * * www-data [ -x /usr/share/lemonldap-ng/bin/purgeLocalCache ] && /usr/share/lemonldap-ng/bin/purgeLocalCache
17-59/30 * * * * www-data [ -d /run/systemd/system ] || [ ! -x /usr/share/lemonldap-ng/bin/purgeLocalCache ] || /usr/share/lemonldap-ng/bin/purgeLocalCache

View File

@ -1,4 +1,5 @@
#
# Regular cron jobs for LemonLDAP::NG Portal
# Regular cron jobs to clean Lemonldap::NG sessions DB
# Launched only if systemd isn't running
#
*/10 * * * * www-data [ -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] && /usr/share/lemonldap-ng/bin/purgeCentralCache
7 * * * * www-data [ -d /run/systemd/system ] || [ ! -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] || /usr/share/lemonldap-ng/bin/purgeCentralCache