Contributed by rueda on from the not-a-random-walk dept.
CVSROOT: /cvs Module name: src Changes by: firstname.lastname@example.org 2023/05/06 17:06:27 Modified files: usr.sbin/cron : crontab.5 entry.c macros.h Log message: Support random offsets when using ranges with a step value in cron. This extends the random range syntax to support step values. Instead of choosing a random number between the high and low values, the field is treated as a range with a random offset less than the step value. This can be used to avoid thundering herd problems where multiple machines contact a server all at the same time via cron jobs. The syntax is similar to the existing range/step syntax but uses a random range. For example, instead of "0-59/10" in the minutes field, "0~59/10" can be used to run a command every 10 minutes where the first command starts at a random offset in the range [0,9]. The high and low numbers are optional, "~/10" can be used instead. Requested by job@, OK phessler@
(Comments are closed)