$ cat 000-delay.cron #!/bin/bash # Generate per system static delay for cron.{daily,weekly,monthly} # (P) & (C) 2006 by Peter Bieringer # # 20060322/PB: initial release # rewrite for configure 20070830 # License: GPLv2 [ -f /etc/sysconfig/crontab ] && . /etc/sysconfig/crontab if [ ! -z "$DELAY" ]; then # 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 T_DELAY=$[ ${decvalue} / ${DELAY} ] sleep $T_DELAY fi exit 0