Article View: muc.lists.freebsd.current
Article #175Re: Should we add jitter to cron(8) ?
From: Tomek CEDRO
Date: Thu, 05 Nov 2026 19:03
Date: Thu, 05 Nov 2026 19:03
118 lines
10478 bytes
10478 bytes
--0000000000009de9be065f8c28f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable +1 :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info On Thu, Nov 5, 2026, 16:28 Darren Henderson <darren.henderson@gmail.com> wrote: > 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= .dk> > 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 >> incompetence. >> >> --0000000000009de9be065f8c28f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div>+1 :-)</div><div><br></div><div data-smartmail=3D"gm= ail_signature">--<br>CeDeROM, SQ7MHZ, <a href=3D"http://www.tomek.cedro.inf= o">http://www.tomek.cedro.info</a></div></div><br><div class=3D"gmail_quote= gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, Nov 5= , 2026, 16:28 Darren Henderson <<a href=3D"mailto:darren.henderson@gmail= .com">darren.henderson@gmail.com</a>> wrote:<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg= b(204,204,204);padding-left:1ex"><div dir=3D"ltr">Considering POLA I believ= e it would=C2=A0be better as an opt-in kind of thing rather than opt-out. I= f people need it they can enable it. In general opt-out changes should be a= voided. Just flipping this around=C2=A0is likely to cause many many unexpec= ted issues for people who are not paying close attention.</div><br><div cla= ss=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 4, 202= 6 at 5:14=E2=80=AFPM Poul-Henning Kamp <<a href=3D"mailto:phk@phk.freebs= d.dk" target=3D"_blank" rel=3D"noreferrer">phk@phk.freebsd.dk</a>> wrote= :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.= 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It seems that = we have solid consensus for jittering by default, 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> </blockquote></div> --0000000000009de9be065f8c28f0-- -- 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:
<CAFYkXjkNW8SbpDVAmcfbp+ruvvKQ6WBT_MooYm78zrvDjs2oMw@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:
<> <CA+MoSuVNTBU-UkGbRaYEstCfs4JcMm8XaiSh237so2SNF0yToQ@mail.gmail.com>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: Tomek CEDRO <tomek@cedro.info>
Newsgroups: muc.lists.freebsd.current
Subject: Re: Should we add jitter to cron(8) ?
Date: Thu, 5 Nov 2026 20:03:50 +0100
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-current@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <CAFYkXjkNW8SbpDVAmcfbp+ruvvKQ6WBT_MooYm78zrvDjs2oMw@mail.gmail.com>
References: <> <CA+MoSuVNTBU-UkGbRaYEstCfs4JcMm8XaiSh237so2SNF0yToQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0000000000009de9be065f8c28f0"
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
logging-data="69179"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1793905471; 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=GfeNkW/XfarmTYLbf2SBHmAFkyO9a09TDB/WPSUXUno=;
b=Unxh+S+riBHsFCehMX08RC1smUGOUiB55dRbmbvj3GOukRzyGE6rMfBMtYMLIb/9s+Xy6a
IXr/FLAxIpLldGV3sxnmOz8TOPVwDgh+WV8wJCecRcZ3YeRuYbVYUvWOsxlRV7nZwCM1rV
lbwf4eE8R62rSli/AsaV2EbYRsHLx9Krp6pDqaOGfkXfITM1ICwNdjljEI/7yTSJAGTNbr
4utHMIvFxnUdDLNU7yK+W/TRe+UZDeS5fgcMAwHBCgwhncqzwC80gcLUyV0/WWni+iimDu
9eOkv0sMXlFb+TGvTvHpManGZyZS75ParpaKYiKLTkaD1JxAThRKkcJvIRt/1w==
X-Original-To: current@mlmmj.nyi.freebsd.org
Authentication-Results: mx1.freebsd.org;
dkim=pass header.d=cedro.info header.s=google header.b=Q66NDEed;
spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2607:f8b0:4864:20::1134) smtp.mailfrom=tomek@cedro.info;
dmarc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=cedro.info; s=google; t=1793905443; x=1794510243; 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=GfeNkW/XfarmTYLbf2SBHmAFkyO9a09TDB/WPSUXUno=;
b=Q66NDEedlixaNkOof63jCbsFeXxaG2jFw0sXO/gxxHs2ZuPl6u6z1nYYohWj0TbP4G
Io82kpyGBQC9K0/j5y/+wVkQD5VDFzD6xVmm5h/JDdGL1zxZoljLvt0ytRMzVplFW52o
aOGE7xMivXFPozvHVav+6d9uL5j9xC3dZrwYATAedaRnPHuUfPpOvlOAqOL1EnWH6xtE
6JMHwuLkX0hY3sWJxZgaPucegflhnTCqPYd24P1+mLAiZkxx7ldIimDsMOr2cmM4m9f1
M/LV1mZjBlUEa8mMqxglXwL64XNFRwrdTm/foRnzg/eZZQLoj9bY3ZrdUQ+LV3zx5kGi
h/Uw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1793905443; x=1794510243;
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=GfeNkW/XfarmTYLbf2SBHmAFkyO9a09TDB/WPSUXUno=;
b=PadjktFmJKJYd9jA95RivUEP+OP2mv/QWN2Oi/17Ext1bEgwBNfZ2xlD99UIQArRjZ
jzpnr2WHzF2REu8So9MdGuKxsuT6PLImKmnkVB9BWGqwtF4WCtDBoMYBXmdsRdVp4jtE
jgq9Q7t+i9K5oH4Unn/33+u2OmorvBMrAzDEHDfObI7VoTKgK55ui5LRe4ZSXKft9ZfF
/IHAwG8lO0hY7ocRrilZNy9JE3wv0siLjZfi4Yn10j6B8FEI/SopDREwitMif63AyU/q
YHo+q1hBPNGVJKuz7GyTtEWx8MEo5ZMhsOsqw0zCdzGdDkQgRDzhft1Ih5v10hjvYCFG
8gsQ==
X-Gm-Message-State: APuU4Z8Au5fnTQxJGYaj3uojGdeJb57pjfYLQh4ovWSz1Pn2sbMDKMP7
56hz0JjZb/MO4wQx31RVSKmP9TSZBGNAZ9W9UHIzZhYxJw8ldqsCLkr+ENsFnWM1ISKNDdr9eaX
IYyFsnQ==
X-Gm-Gg: AYBFou2IW9SXDlsE7xRbnxDm27UBazYz4T35tGWOpNDsdkyLrwPwlPC7vIeJNiDoiLd
W89C21mOHOROCA4D5p/KW1ukBgeWb2YZU/WwcH4g+/SmXIeBuQoGodXBSGBZFsATOOnaRzdXegh
eRHPWkD+KwSERF4etpjBnfzdLx1NJYfGJ3LCVdoJgF0mzvWKfp1jpiLca3aRkq+l0a4oWxj/22B
nuLr9cikdW13LmAiHxoJmI1rjqpRiKNM1elbDns22aHtqeafi2VcGGqIH3Rhg0LOJ0AOHH2G1kl
5a1maBiX+ei/hdx47LMbQGL4/Lm4TH2MiquceL6A3IyoFgSwx1MS85pQxlXS1F4AZS5jRCVNttY
7G9o982C+p5ZPDa0bZ6rIWwes27p+SDLgVfyxU5XDuDaQe87Jd5qYaUVROnqqasSm6D1d3LLr9E
gQO+3H6xCXuYE4rStDl/4xcznYRy6/Jk7+mQhsYKdN+OtHEhz6xnDzOPhiJESpICTZdDn3023Yu
Fxam7VdyJWNmYOEWG5xk+tAqLr3oVnCIu1W0nd98PQXoOyMArjL6zyUXJDM2Y9YvmvqiUkXpxwj
L7G4UdufSUHjEb1rCSLbU+k+CpS6pPsLkzNp7UXIVLytoBJj6uQjkgsZ8ueRpxBi
Precedence: list
In-Reply-To: <CA+MoSuVNTBU-UkGbRaYEstCfs4JcMm8XaiSh237so2SNF0yToQ@mail.gmail.com>
X-Gmail-Original-Message-ID: <CAFYkXjkNW8SbpDVAmcfbp+ruvvKQ6WBT_MooYm78zrvDjs2oMw@mail.gmail.com>
X-Gm-Features: AclHuK-xqHVvnvx0vdRHiMjq3ArlP_h5na7BiIOqZFVyHy5TKkvZJoQXGiZNnws
X-Rspamd-Queue-Id: 4jLBYj3JW3z3GPP
X-Spamd-Bar: /
X-Spamd-Result: default: False [0.70 / 15.00];
SUBJECT_ENDS_QUESTION(1.00)[];
R_DKIM_ALLOW(-0.20)[cedro.info:s=google];
MIME_GOOD(-0.10)[multipart/alternative,text/plain];
RCVD_VIA_SMTP_AUTH(0.00)[];
DMARC_NA(0.00)[cedro.info];
RCVD_TLS_LAST(0.00)[];
ARC_NA(0.00)[];
MISSING_XM_UA(0.00)[];
ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1134:from,209.85.128.174:received];
MIME_TRACE(0.00)[0:+,1:+,2:~];
R_SPF_NA(0.00)[no SPF record];
FREEMAIL_TO(0.00)[gmail.com];
MLMMJ_DEST(0.00)[current@freebsd.org];
TO_MATCH_ENVRCPT_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
RCPT_COUNT_THREE(0.00)[3];
PREVIOUSLY_DELIVERED(0.00)[current@freebsd.org];
RCVD_COUNT_THREE(0.00)[3];
TO_DN_ALL(0.00)[];
ALIAS_RESOLVED(0.00)[];
DKIM_TRACE(0.00)[cedro.info:+]
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes