Article View: muc.lists.freebsd.current
Article #173Re: Should we add jitter to cron(8) ?
From: Darren Henderson
Date: Thu, 05 Nov 2026 15:28
Date: Thu, 05 Nov 2026 15:28
101 lines
9530 bytes
9530 bytes
--000000000000752e1b065f89254e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Considering POLA I believe it would be better as an opt-in kind of thing rather than opt-out. If people need it they can enable it. In general opt-out changes should be avoided. Just flipping this around is likely to cause many many unexpected issues for people who are not paying close attention. On Wed, Nov 4, 2026 at 5:14=E2=80=AFPM Poul-Henning Kamp <phk@phk.freebsd.d= k> wrote: > 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=E2=80=A659[ 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 incompetenc= e. > > --000000000000752e1b065f89254e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Considering POLA I believe it would=C2=A0be better as an o= pt-in kind of thing rather than opt-out. If people need it they can enable = it. In general opt-out changes should be avoided. Just flipping this around= =C2=A0is likely to cause many many unexpected issues for people who are not= paying close attention.</div><br><div class=3D"gmail_quote gmail_quote_con= tainer"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 4, 2026 at 5:14= =E2=80=AFPM Poul-Henning Kamp <<a href=3D"mailto:phk@phk.freebsd.dk">phk= @phk.freebsd.dk</a>> wrote:<br></div><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pad= ding-left:1ex">It seems that we have solid consensus for jittering by defau= lt, with<br> option to disable.<br> <br> I had not spotted the -j/-J options to cron before I raised the<br> issue, but given those, I dont see neither an need for code changes<br> nor bike-sheds about their syntax.<br> <br> It is of course mathematically ideal to jitter [0=E2=80=A659[ seconds.<br> <br> But that would lead to some anomalies which I would rather avoid,<br> for instance a "every minute" job being called twice within a few= <br> seconds.<br> <br> In power grids the relevant regulation time constants are typically<br> below 10 and almost always less than 15 seconds.<br> <br> So on balance, I propose we change the cron default arguments to include<br= > <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 -j 20 -J 20<br> <br> That way there will be at least 40 seconds between "once per minute jo= bs".<br> <br> -- <br> Poul-Henning Kamp=C2=A0 =C2=A0 =C2=A0 =C2=A0| UNIX since Zilog Zeus 3.20<br= > phk@FreeBSD.ORG=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| TCP/IP since RFC 956<br> FreeBSD committer=C2=A0 =C2=A0 =C2=A0 =C2=A0| BSD since 4.3-tahoe=C2=A0 =C2= =A0 <br> Never attribute to malice what can adequately be explained by incompetence.= <br> <br> </blockquote></div> --000000000000752e1b065f89254e-- -- Posted automagically by a mail2news gateway at muc.de e.V. Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<CA+MoSuVNTBU-UkGbRaYEstCfs4JcMm8XaiSh237so2SNF0yToQ@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailReferences:
<6aeb4ea6.600.188550c5@critter.freebsd.dk> <>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Darren Henderson <darren.henderson@gmail.com>
Newsgroups: muc.lists.freebsd.current
Subject: Re: Should we add jitter to cron(8) ?
Date: Thu, 5 Nov 2026 10:28:10 -0500
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-current@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <CA+MoSuVNTBU-UkGbRaYEstCfs4JcMm8XaiSh237so2SNF0yToQ@mail.gmail.com>
References: <6aeb4ea6.600.188550c5@critter.freebsd.dk> <>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000752e1b065f89254e"
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
logging-data="15182"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1793892530; h=from:from:sender:sender:reply-to:subject:subject:date:date:
message-id:message-id:to:to:cc:cc:mime-version:mime-version:
content-type:content-type:in-reply-to:in-reply-to:
references:references:list-id:list-help:list-owner:list-unsubscribe:
list-subscribe:list-post; bh=Q/KsZcPeOKhFsVpATJTRLliOlniTZB+7G1D/Im/+x1w=;
b=f7agtrTfyqWofnOUfsN7J08NUaTbJsxuNI2pSmECnGm5Dusg5W3guJdoyjbVSCux17BH2w
r90Dka+EAyQfCN6FqBzQSY5yK/RY3iUi7pocDrQzTuLcJK+M0OLzJzD/ZHA+3ZBJiOgloo
oNB/FOIOWQ4fNHg7ys5ETGG6mmC2Ftbk4RIpxDf8J2OEOitp6GTBGjjt/Bvi4Vl5eZ2B9i
1rAn5uK+x34FUZsUK6FZJt7nI9BBn16WwzIiXppAjZUo+gRSxOTmWDf00kfDC7ax8Id0pQ
LnCYjEj0xmr+Wt+XAJVdFeARKjuaLH2HKD1Cwqj4716l9wxllSXAcwJjcswbgA==
X-Original-To: current@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
dkim=pass header.d=gmail.com header.s=20260707 header.b=QP5TFsEb;
spf=pass (mx1.freebsd.org: domain of darren.henderson@gmail.com designates 2607:f8b0:4864:20::112f as permitted sender) smtp.mailfrom=darren.henderson@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com;
arc=pass ("google.com:s=arc-20260327:i=1")
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1793892504; x=1794497304; darn=freebsd.org;
h=content-type:cc:to:subject:message-id:date:from:in-reply-to
:references:mime-version:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=Q/KsZcPeOKhFsVpATJTRLliOlniTZB+7G1D/Im/+x1w=;
b=QP5TFsEbIYdgGVo7oxRj3N+o6CiOn0HCiPq9Eq5VDtaUcmvki47B0mZ6WsZ5lw/3uy
K+o5C0p2xlq3LYN2d+6/J3HMnXLmglqiOCPJOVM0NGRrF2t3nID0sdlk22s9TUk1CPRn
nPy5C6Q6PX1WlIhYlh40XtgTk294T73Zj2+3AMdhQD1limL5lRn/8zheo4FqoHLKEFLO
bsfVY3b0HW6yEaiLndZkErnfEC0hVu9xj10Y+w37kAyplGRLuQVd7X5YXsWvgylQomw8
4HspQhkR6KkTWGM4CkLdKrlppHSeRGu6zOuc78iVQ91jbXnr+V4hJVst8SU9ZDS5v8mT
l6Ow==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793892504; x=1794497304;
h=content-type:cc:to:subject:message-id:date:from:in-reply-to
:references:mime-version:x-gm-gg:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=Q/KsZcPeOKhFsVpATJTRLliOlniTZB+7G1D/Im/+x1w=;
b=iUrgEF0A0Qeo1lyqpstIhxBhvZr8ThxaLcZOUYMz01060vkjkG0wZJxSVA9VNFA6IQ
WhjTkYtLdRb6mRRLcjZmmD5YHpzvwK7r1hjzCL2QS+5X0khOOOyA5MdBQyzaTJ33Z7HF
1vDut68drdnhuz7BJFTtuDBtnNA6QiKa2onQLdUFXfPG4UOwZ5K2Vt3nma1+APUtpZ49
qPTwuJS0q51ZxjZxKKb6fGpiKRlm8cXfdQn4GUYN4QFB3zfvgvedEuspcD5pAabV7Dh8
GbfQgmqd/uPIymzN0DA1IDiulKGsq176oHLgY+NMPPsAu8e4OgAke+nv34kakZSigtj6
6yAQ==
X-Gm-Message-State: APuU4Z/ch4U1YFFTmHn9zUoI9lW426VAmMp8HkOaGUIxjk/FTkzw525l
KxcnnM7QQp2RKtMXfrin0RUF2kU3KjXZTLXRopu/jK/rpCGhFBGsxuddfNY3lXDytD6CLxib2AU
jHoKraNQahFLYqCiEXC4s3UMq2qsOx+PdyA==
X-Gm-Gg: AYBFou2JAhaExWxf9WrX23aEs3cI+dTbRdHE96Qo1l56pr2pWS+0rIspOkw/9z5uvme
JH1Bcg5fnDmvPHNleCfufIHSJ9tPXV+8OIbjDQwQH65w4PHzMnYJ/YQbdlGVKWz2+w77k7S3JgO
4s/dNMI6WgrnxfY2ii5mFaUvVwrCdc36IeWMdKfE8ViBmKTJTetGD1tq6yPXzyGuHBLfJPOozE6
W9alpFL/DC9wrFOs8GZVHN4oW33y3F6YvKhGzVz1Z9UrxQBxE9E5Q4Fuu0Rd0rUJ+m2cmZ28xwy
OlDyFR7rmDI/l8KjXFXZ/tc/dJBU/sJo02Y7ljFPJ2yuLV9q1Eh2sE3lbV77dmoVv0Vk0tBgEkD
yCVtEheRuc7xD9Zdiaf+HrTn5UZmGNzvsWKCovw==
Precedence: list
In-Reply-To: <6aeb4ea6.600.188550c5@critter.freebsd.dk>
X-Gm-Features: AclHuK9P8QJF-3FpPvykKEoBHnE1WWZw4CVFzgRWkOJkDNZvCaGarAHP78yaTJw
X-Rspamd-Queue-Id: 4jL5mn5wcdz4Pt6
X-Spamd-Bar: /
X-Spamd-Result: default: False [-1.00 / 15.00];
SUBJECT_ENDS_QUESTION(1.00)[];
ARC_ALLOW(-1.00)[google.com:s=arc-20260327:i=1];
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
R_DKIM_ALLOW(-0.20)[gmail.com:s=20260707];
R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c];
MIME_GOOD(-0.10)[multipart/alternative,text/plain];
ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
RCVD_COUNT_ONE(0.00)[1];
TO_DN_SOME(0.00)[];
MISSING_XM_UA(0.00)[];
MIME_TRACE(0.00)[0:+,1:+,2:~];
FREEMAIL_ENVFROM(0.00)[gmail.com];
FREEMAIL_FROM(0.00)[gmail.com];
MID_RHS_MATCH_FROMTLD(0.00)[];
RCPT_COUNT_TWO(0.00)[2];
MLMMJ_DEST(0.00)[current@freebsd.org];
TO_MATCH_ENVRCPT_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::112f:from];
DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
RCVD_TLS_LAST(0.00)[];
PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org];
ALIAS_RESOLVED(0.00)[];
DKIM_TRACE(0.00)[gmail.com:+]
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes