Re: Should we add jitter to cron(8) ?

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Wed, 04 Nov 2026 15:26:30 UTC
It seems that we have solid consensus for jittering by default, with
option to disable.

I had not spotted the -j/-J options to cron before I raised the
issue, but given those, I dont see neither an need for code changes
nor bike-sheds about their syntax.

It is of course mathematically ideal to jitter [0…59[ seconds.

But that would lead to some anomalies which I would rather avoid,
for instance a "every minute" job being called twice within a few
seconds.

In power grids the relevant regulation time constants are typically
below 10 and almost always less than 15 seconds.

So on balance, I propose we change the cron default arguments to include

	-j 20 -J 20

That way there will be at least 40 seconds between "once per minute jobs".

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.