Am 13.04.26 um 14:06 schrieb Vincent Lefevre:
Control: retitle -1 upgrade frozen on "Setting up anacron (2.3-48) ..." when
upgrading between midnight and 07:30
On 2026-04-13 13:11:54 +0200, Vincent Lefevre wrote:
Actually I think that there were no reasons to run the above jobs
on the other machine. I had (the first two concern both cron.daily
and cron.weekly):
[...]
So, cron.daily & cron.weekly jobs are normally run at around 7:30
(every day for cron.daily, every week for cron.weekly). But on this
machine, when I upgraded, it did not wait for 7:30.
Note: the 7:30 corresponds to the first hour in
[Timer]
OnCalendar=*-*-* 07..23:30
RandomizedDelaySec=5m
Persistent=true
of the /etc/systemd/system/timers.target.wants/anacron.timer file.
Or is this forced when the deadline is close enough, e.g. a few hours
before cron.weekly jobs should be run?
This is indeed the case. The anacron(8) man page says:
After the command exits, Anacron records the date in a
special timestamp file for that job, so it can know when
to execute it again. Only the date is used for the time
calculations. The hour is not used.
So I got the issue on the first machine because I upgraded
between midnight and about 7:30.
That can't be quite right, I encountered the problem outside that time
(UTC+2 in case timezones might matter):
2026-04-12 10:16:09 configure anacron:amd64 2.3-48 <none>
2026-04-12 10:16:09 status unpacked anacron:amd64 2.3-48
2026-04-12 10:16:09 status half-configured anacron:amd64 2.3-48
2026-04-12 10:21:10 status installed anacron:amd64 2.3-48
The machine had been in suspend over night, and these are the first
lines "journalctl -u anacron.timer -u anacron.service" shows for the day:
Apr 12 10:12:33 haruka systemd[1]: Started anacron.service - Run anacron
jobs.
Apr 12 10:12:33 haruka anacron[2210847]: Anacron 2.3 started on 2026-04-12
Apr 12 10:12:33 haruka anacron[2210847]: Will run job `cron.daily' in 5 min.
Apr 12 10:12:33 haruka anacron[2210847]: Jobs will be executed sequentially
Apr 12 10:16:10 haruka anacron[2210847]: Received SIGUSR1
Apr 12 10:16:10 haruka anacron[2210847]: Exited
Apr 12 10:16:10 haruka systemd[1]: Stopping anacron.service - Run
anacron jobs..
.
Apr 12 10:16:10 haruka systemd[1]: anacron.service: Deactivated
successfully.
Apr 12 10:16:10 haruka systemd[1]: Stopped anacron.service - Run anacron
jobs.
Apr 12 10:16:10 haruka systemd[1]: Starting anacron.service - Run
anacron jobs..
.
Apr 12 10:16:10 haruka systemd[1]: anacron.timer: Deactivated successfully.
Apr 12 10:16:10 haruka systemd[1]: Stopped anacron.timer - Trigger
anacron every
hour.
Apr 12 10:16:10 haruka systemd[1]: Stopping anacron.timer - Trigger
anacron ever
y hour...
Apr 12 10:16:10 haruka systemd[1]: Started anacron.timer - Trigger
anacron every
hour.
Apr 12 10:16:10 haruka anacron[2214681]: Anacron 2.3 started on 2026-04-12
Apr 12 10:16:10 haruka anacron[2214681]: Will run job `cron.daily' in 5 min.
Apr 12 10:16:10 haruka anacron[2214681]: Jobs will be executed sequentially
Apr 12 10:21:10 haruka anacron[2214681]: Job `cron.daily' started
Apr 12 10:21:10 haruka anacron[2214681]: Job `cron.daily' terminated
Apr 12 10:21:10 haruka anacron[2214681]: Normal exit (1 job run)
Apr 12 10:21:10 haruka systemd[1]: anacron.service: Deactivated
successfully.
Apr 12 10:21:10 haruka systemd[1]: Finished anacron.service - Run
anacron jobs.
So "update before anacron jobs ran" still seems plausible as the
trigger, but not the fixed time frame. But that's confusing in itself:
If there are pending jobs, shouldn't they run in the background instead
of blocking when the timer unit is started?
Best regards,
Fiona