Re: Should we add jitter to cron(8) ?
- In reply to: Poul-Henning Kamp : "Should we add jitter to cron(8) ?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Nov 2026 15:06:55 UTC
> On Nov 2, 2026, at 3:25 AM, Poul-Henning Kamp <phk@phk.freebsd.dk> wrote: > > Embedded systems using cron(8) are starting to cause macroscopic > effects at the top of the minute: > > https://www.fz-juelich.de/en/news/archive/press-release/2026/mystery-of-60-second-fluctuations-in-power-grids-solved > > That indicates that we should add jitter to cron(8). > > I can see three ways to do it: > > A) By default cron(8) waits [0...N] seconds before executing commands. > This can be disabled with a command line option. > For a number of reasons which we can hash later, I suggest N=30 > > B) Same as A), but the command line option enables jitter. > > C) Same as A), but with additional crontab(5) syntax to say "dont > jitter this particular entry". > > I would argue that A is the proper choice. > > Comments ? We can add a cron_flags="-s -j 30 -J 30" to /etc/defaults/rc.conf. I suspect the % of embedded FreeBSD systems is rather low to matter. Embedded Linux & various RTOSes will do their own thing in any case.