Article 6C81N cron(8) now supports random ranges with steps

cron(8) now supports random ranges with steps

by
from OpenBSD Journal on (#6C81N)

Thanks to the followingcommitby Todd Miller (millert@),cron(8)now supports random values in a rangewith a step value(i.e."<lo>~<hi>/<step>"incrontab(5) entries):

CVSROOT:/cvsModule name:srcChanges by:millert@cvs.openbsd.org2023/05/06 17:06:27Modified 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. Insteadof choosing a random number between the high and low values, thefield is treated as a range with a random offset less than the stepvalue. This can be used to avoid thundering herd problems wheremultiple machines contact a server all at the same time via cron jobs.The syntax is similar to the existing range/step syntax but uses arandom range. For example, instead of "0-59/10" in the minutesfield, "0~59/10" can be used to run a command every 10 minutes wherethe 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@
External Content
Source RSS or Atom Feed
Feed Location http://undeadly.org/cgi?action=rss
Feed Title OpenBSD Journal
Feed Link http://undeadly.org/
Reply 0 comments