]> git.ipfire.org Git - ipfire.org.git/commitdiff
cron: Avoid having multiple of the same jobs running
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Dec 2024 12:33:29 +0000 (12:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 6 Dec 2024 12:33:29 +0000 (12:33 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/crontab/ipfire

index 54481790fa0e6b48539fcbbd9626775307b52cae..f79621afc73ebd72838d533b5596dc6418527147 100644 (file)
@@ -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