[systemd-devel] "OnUnitInactiveSec Timer not firing" issue

Windl, Ulrich u.windl at ukr.de
Mon Jul 29 06:26:33 UTC 2024


Hi!

I tried to use my first systemd timer, but failed: Either I don't understand it correctly, or there is a bug in systemd (228 of SLES12 SP5):
(See also https://unix.stackexchange.com/q/779714/320598)

It seems it's not enough to "enable" the timer, but also "start" it (well, it may seem logical from the systemd point of view, but from a cron user's point of view enabling should be enough)
Furthermore it seems to be necessary to run the service unit itself,  too (assuming it must be enabled also, right?)
But the biggest thing is that systemd seems to lose the point-in-time of the last activation, so the timer won't fire any more (e.g. after package upgrade when everything enabled would be re-enabled, and everything started would be re-started).
But most of all if the system reboots, the timer also won't fire any more.

So can anybody explain how things should work?


My expectation was that an OnUnitInactiveSec timer would fire immediately if it never ran, and then every day from that.

Kind regards,
Ulrich


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20240729/f0296b6a/attachment.htm>


More information about the systemd-devel mailing list