I found the file 000-delay.cron.
It introduces a per-machine static sleep before cron jobs.
My guess it that putting a random wait for cron jobs for all *nix machines reduces traffic jams.
For example, what if all machines in a network ran the cron job download-huge-file.cron at the same time? It would cause a big lag for the whole network!
Does anyone else have thoughts on why the file 000-delay.cron exists?
Code:
$ cat /etc/cron.daily/000-delay.cron
#!/bin/bash
# Generate per system static delay for cron.{daily,weekly,monthly}
# (P) & (C) 2006 by Peter Bieringer <pb@bieringer.de>
#
# 20060322/PB: initial release
# License: GPLv2
factor=1 # max. ~ 68 minutes
#factor=2 # max. ~ 34 minutes
# Create md5sum of hostname (static over system lifetime)
md5sum="`echo ${HOSTNAME} | md5sum`"
# Extract the first 3 hexdigits (12 Bit: 0-4095)
hexvalue="${md5sum:0:3}"
# Create decimal value
decvalue="`printf "%d" "0x${hexvalue}"`"
# Divide delay by factor
DELAY=$[ ${decvalue} / ${factor} ]
sleep $DELAY
exit 0
-JTomMoon79
This was also posted here:
http://lists.linuxcoding.com/rhl/2007q1/msg04528.html