]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - crontab.d/jobs
Add rsleep script and use it in crontab.d/jobs.
[config/dotfiles.git] / crontab.d / jobs
index 1e6c4d2748b144d7b8d6717223b5bbbfc46ac196..f898f228224c821b1703e472834ae2b02f8f019e 100644 (file)
 # Include user's binaries in PATH. Expanding $HOME doesn't work with cron,
 # `update.sh` handles that!
 PATH=$HOME/bin:$HOME/.shell/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
-# "RAND_SLEEP X" is also expanded by `update.sh` to a command which sleeps
-# randomly between 0 and X seconds. Used to reduce concurrent commands if this
+# `rsleep` (random sleep) is used to reduce concurrent commands if this
 # crontab file is used by multiple users.
 
 
 # Taken from Debian's /etc/crontab from cron package 3.0pl1-124 and modified.
 # Thanks.
-17 * * * * RAND_SLEEP 60;   run-parts --report .crontab.d/jobs.hourly
-25 6 * * * RAND_SLEEP 1800; run-parts --report .crontab.d/jobs.daily
-47 6 * * 7 RAND_SLEEP 3600; run-parts --report .crontab.d/jobs.weekly
-52 6 1 * * RAND_SLEEP 3600; run-parts --report .crontab.d/jobs.monthly
+17 * * * * rsleep 60;   run-parts --report .crontab.d/jobs.hourly
+25 6 * * * rsleep 1800; run-parts --report .crontab.d/jobs.daily
+47 6 * * 7 rsleep 3600; run-parts --report .crontab.d/jobs.weekly
+52 6 1 * * rsleep 3600; run-parts --report .crontab.d/jobs.monthly
 
 # Run on system startup.
 @reboot run-parts --report .crontab.d/jobs.reboot
@@ -39,7 +38,7 @@ PATH=$HOME/bin:$HOME/.shell/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/u
 # Run every minute.
 * * * * * run-parts --report .crontab.d/jobs.minutely
 # Run every x hours.
-31 */6 * * * RAND_SLEEP 600; run-parts --report .crontab.d/jobs.hourly6
-39 */8 * * * RAND_SLEEP 600; run-parts --report .crontab.d/jobs.hourly8
+31 */6 * * * rsleep 600; run-parts --report .crontab.d/jobs.hourly6
+39 */8 * * * rsleep 600; run-parts --report .crontab.d/jobs.hourly8
 
 # vim: ft=crontab