If a computer is only running occasionally the apt-daily*.timers
(apt-daily.timer and apt-daily-upgrade.timer) are hardly ever executed.
As far as I understand this is because of the RandomizedDelaySec values
for the timers. Especially the 12h for the apt-daily.timer.
Lets say a computer is running only 30 minutes every month.
That makes 6 hours a year.
Then statistically the apt-daily.timer will only run once every 2 years.
Those computers could be rarely used pc's, notebooks or even
offline-backup systems.
I'm not an expert for systemd timers. But I'd say the timer should run
immediately after boot (and wakeup from s2ram/s2disk), if the timer
expired while the computer wasn't running.
This is a notebook, being rarely used by one of my family members.
You can see, that it's being used for 5 to 60 minutes every few weeks.
$ zgrep -aEo '.*(Command line: BOOT_IMAGE=|PM: hibernation: hibernation
(entry|exit))' /var/log/messages{.2,.1,}
/var/log/messages.2:Nov 6 13:36:38 MyPC kernel: [ 7024.194560] PM:
hibernation: hibernation exit
/var/log/messages.2:Nov 6 13:46:51 MyPC kernel: [ 7638.066922] PM:
hibernation: hibernation entry
/var/log/messages.2:Nov 26 15:32:20 MyPC kernel: [ 7647.920545] PM:
hibernation: hibernation exit
/var/log/messages.1:Nov 26 16:26:32 MyPC kernel: [10918.255697] PM:
hibernation: hibernation entry
/var/log/messages.1:Dec 1 11:17:26 MyPC kernel: [10945.390253] PM:
hibernation: hibernation exit
/var/log/messages.1:Dec 1 11:21:38 MyPC kernel: [11198.595707] PM:
hibernation: hibernation entry
/var/log/messages.1:Dec 1 11:22:52 MyPC kernel: [11251.644099] PM:
hibernation: hibernation exit
# shut down at Dec 1 around 12:00 (couldn't find that in the logs)
/var/log/messages.1:Dec 4 18:52:44 MyPC kernel: [ 0.000000] Command
line: BOOT_IMAGE=
$ systemctl list-timers apt-daily.timer
NEXT LEFT LAST
PASSED UNIT ACTIVATES
Sat 2021-12-04 19:21:08 CET 17min left Mon 2021-11-01 12:16:15 CET 1
months 2 days ago apt-daily.timer apt-daily.service
Regards,
kolAflash