From 7ecf4bef4a1aa5e5328f97f395e33cc03b67a961 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Fri, 6 Dec 2024 12:33:29 +0000 Subject: [PATCH] cron: Avoid having multiple of the same jobs running Signed-off-by: Michael Tremer --- src/crontab/ipfire | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crontab/ipfire b/src/crontab/ipfire index 54481790..f79621af 100644 --- a/src/crontab/ipfire +++ b/src/crontab/ipfire @@ -7,16 +7,16 @@ SHELL=/bin/bash 0 * * * * nobody ipfire.org --logging=error scan-files # Send messages -* * * * * nobody flock /tmp/.ipfire.org.send-all-messages.lock ipfire.org --logging=error send-all-messages +* * * * * nobody flock --nonblock --conflict-exit-code 0 /tmp/.ipfire.org.send-all-messages.lock ipfire.org --logging=error send-all-messages # Announce blog posts -*/5 * * * * nobody flock /tmp/.ipfire.org.announce-blog-posts ipfire.org --logging=error announce-blog-posts +*/5 * * * * nobody flock --nonblock --conflict-exit-code 0 /tmp/.ipfire.org.announce-blog-posts ipfire.org --logging=error announce-blog-posts # Cleanup once an hour 30 * * * * nobody ipfire.org --logging=error cleanup # Check mirrors once every 30 min -*/30 * * * * nobody ipfire.org --logging=error check-mirrors +*/30 * * * * nobody flock --nonblock --conflict-exit-code 0 /tmp/.ipfire.org.check-mirrors ipfire.org --logging=error check-mirrors # Toot once a day 0 8 * * * nobody sleep ${RANDOM} && ipfire.org --logging=error toot -- 2.47.3