Solved What if systemd timer is missed due to system being shut down?

Solved issue

CaffeineAddict

Well-Known Member
Joined
Jan 21, 2024
Messages
1,494
Reaction score
1,023
Credits
12,246
I see if cron job is set to run when system is shut down then it will not run:


But what about systemd timers? is behavior the same or do missed timers run as soon as system is up?
 


Suggest use anacron?

Cron is your go-to scheduler for always-on systems and offers greater flexibility in terms of time and user-specific jobs. On the other hand, Anacron is the tool you need for systems that aren't always running, ensuring that no scheduled task is ever missed

Wiz
 
Suggest use anacron?
Thanks Wiz but I think you missed my question, anacron solution applies to cron jobs only?
But I'm concerned with systemd timers because almost all timers on my system are systemd not cron.

I need to know what happens is systemd timer is missed.

edit:

Suggest use anacron?
Actually thanks for telling, it let me to google out for anacron equivalent for systemd and ended up on this:

CHANGES WITH 212:

* Timer units gained a new Persistent= switch. If enabled,
timers configured this way will save to disk when they have
been last triggered. This information is then used on next
reboot to possible execute overdue timer events, that
could not take place because the system was powered off.
This enables simple anacron-like behaviour for timer units.


So unless timer units have this switch set to true the behavior is same as with cron jobs.
 
Last edited:

Members online


Latest posts

Top