My attempt to restrict unattended reboots to times between 0 and 6 AM wasn't successful. What I did is I created a /etc/systemd/system/apt-daily.timer.d/override.conf with the following contents:
[Timer] OnCalendar=*-*-* 00:00 RandomizedDelaySec=6h
unattended-upgrade ran and rebooted my server at 1:27 AM, at which point journalctl shows
Nov 10 01:27:36 fridge systemd[1]: apt-daily.timer: Adding 4h 13min 49.738746s random time. Nov 10 01:27:36 fridge systemd[1]: Started Daily apt activities.
which would lead me to expect another run at 6:40 AM (which is already outside my desired hours, but okay, not too bad). Instead, what I got was
Nov 10 01:29:02 fridge systemd[1]: apt-daily.timer: Adding 3h 12min 35.192149s random time.
and then
Nov 10 09:13:06 fridge systemd[1]: Starting Daily apt activities...
which rudely interrupted my morning Mutt session with another reboot.
Bug in systemd's timers?
My attempt to restrict unattended reboots to times between 0 and 6 AM wasn't successful. What I did is I created a /etc/systemd/ system/ apt-daily. timer.d/ override. conf with the following contents:
[Timer] *-*-* 00:00 elaySec= 6h
OnCalendar=
RandomizedD
unattended-upgrade ran and rebooted my server at 1:27 AM, at which point journalctl shows
Nov 10 01:27:36 fridge systemd[1]: apt-daily.timer: Adding 4h 13min 49.738746s random time.
Nov 10 01:27:36 fridge systemd[1]: Started Daily apt activities.
which would lead me to expect another run at 6:40 AM (which is already outside my desired hours, but okay, not too bad). Instead, what I got was
Nov 10 01:29:02 fridge systemd[1]: apt-daily.timer: Adding 3h 12min 35.192149s random time.
and then
Nov 10 09:13:06 fridge systemd[1]: Starting Daily apt activities...
which rudely interrupted my morning Mutt session with another reboot.
Bug in systemd's timers?