Gentoo Archives: gentoo-user

From: Ian Zimmerman <itz@××××××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: FYI: Daily / weekly / monthly cron jobs run twice on DST - non-DST transition
Date: Sun, 29 Oct 2017 17:59:47
Message-Id: 20171029175931.kjjvspsw7y37wqzh@matica.foolinux.mooo.com
In Reply to: Re: [gentoo-user] FYI: Daily / weekly / monthly cron jobs run twice on DST - non-DST transition by Michael Orlitzky
1 On 2017-10-29 09:16, Michael Orlitzky wrote:
2
3 > Do you need something smarter? Install anacron, fcron, cronie, or
4 > whatever. But the worst thing we can do is try to mimic those
5 > intelligent crons and have it fail to do so randomly. That's still
6 > your best option, by the way: rewrite your crontab to avoid run-crons,
7 > and install a smart cron implementation that does what you want.
8
9 I was glad to find run-crons on gentoo when I migrated from debian,
10 which does (and always has done, AFAIR) what you suggest. The main
11 reason was that anacron is also _stupid_: it thinks all months are 30
12 days. If you schedule a monthly job with anacron, it will run on
13 January 1st, then on January 31st, then on March 2nd (in most years!)
14 etc. Which may not be too bad when you consider one host by itself,
15 but the schedule will get all out of sync with other hosts if they run
16 real (non-anacron) monthly cronjobs.
17
18 So, for hosts that are not up 24h per day, anacron is _not_ a full
19 solution. Something like run-crons is needed. If the gentoo
20 implementation is too opaque or buggy, it should be rewritten, not
21 discarded.
22
23 --
24 Please don't Cc: me privately on mailing lists and Usenet,
25 if you also post the followup to the list or newsgroup.
26 Do obvious transformation on domain to reply privately _only_ on Usenet.

Replies