From 4bbbffedd451f62cc9237c0cd102e4724abba6a1 Mon Sep 17 00:00:00 2001 From: creme Date: Wed, 5 Feb 2020 00:30:22 +0100 Subject: [PATCH] change few cronjobs to not run them all at the same time --- etc/cron.d/botany | 2 +- etc/cron.d/certbot | 2 +- etc/cron.d/envs_sysinfo | 4 ++-- etc/cron.d/tilde_admin | 2 +- etc/cron.d/update-blacklist_fail2ban | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/etc/cron.d/botany b/etc/cron.d/botany index 56cbe5d..b9d916a 100644 --- a/etc/cron.d/botany +++ b/etc/cron.d/botany @@ -1,4 +1,4 @@ SHELL=/bin/sh PATH=/usr/bin:/opt/services -0 0 * * 0 services python /opt/services/botany/clear_weekly_users.py >/dev/null 2>&1 +3 0 * * 0 services python /opt/services/botany/clear_weekly_users.py >/dev/null 2>&1 diff --git a/etc/cron.d/certbot b/etc/cron.d/certbot index 1667397..7fecfe7 100644 --- a/etc/cron.d/certbot +++ b/etc/cron.d/certbot @@ -14,4 +14,4 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -0 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --deploy-hook /etc/letsencrypt/renewal-hooks/deploy/envs.sh --renew-hook "systemctl reload nginx" +1 */12 * * * root test -x /usr/bin/certbot -a \! -d /run/systemd/system && perl -e 'sleep int(rand(43200))' && certbot -q renew --deploy-hook /etc/letsencrypt/renewal-hooks/deploy/envs.sh --renew-hook "systemctl reload nginx" diff --git a/etc/cron.d/envs_sysinfo b/etc/cron.d/envs_sysinfo index 1196ce9..2336977 100644 --- a/etc/cron.d/envs_sysinfo +++ b/etc/cron.d/envs_sysinfo @@ -1,7 +1,7 @@ # -# generate sysinfo.json and sysinfo.php every day +# generate sysinfo.json and sysinfo.php once per day # SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -0 0 * * * root /usr/local/bin/envs.net/envs_sysinfo.sh >/dev/null 2>&1 +1 0 * * * root /usr/local/bin/envs.net/envs_sysinfo.sh >/dev/null 2>&1 diff --git a/etc/cron.d/tilde_admin b/etc/cron.d/tilde_admin index 4ab8388..79a5134 100644 --- a/etc/cron.d/tilde_admin +++ b/etc/cron.d/tilde_admin @@ -4,4 +4,4 @@ SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -0 0 * * * root make -C /var/tilde/admins/ DEST_DIR=/var/ DEST_OWNER=root DEST_GROUP=www-data >/dev/null 2>&1 +5 0 * * * root make -C /var/tilde/admins/ DEST_DIR=/var/ DEST_OWNER=root DEST_GROUP=www-data >/dev/null 2>&1 diff --git a/etc/cron.d/update-blacklist_fail2ban b/etc/cron.d/update-blacklist_fail2ban index 9202e9f..4378b3c 100644 --- a/etc/cron.d/update-blacklist_fail2ban +++ b/etc/cron.d/update-blacklist_fail2ban @@ -3,4 +3,4 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 0-59/30 * * * * root /usr/local/sbin/ipset-fail2ban.sh /etc/ipset-fail2ban/ipset-fail2ban.conf >/dev/null 2>/dev/null& # clear list once per week -0 0 * * 0 root /usr/local/sbin/ipset-fail2ban.sh /etc/ipset-fail2ban/ipset-fail2ban.conf -c >/dev/null 2>&1 +2 0 * * 0 root /usr/local/sbin/ipset-fail2ban.sh /etc/ipset-fail2ban/ipset-fail2ban.conf -c >/dev/null 2>&1