[systemd-bugs] [Bug 76067] New: Optionally persist unit timestamps to enable anacron-like timers

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Mar 12 03:37:13 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=76067

          Priority: medium
            Bug ID: 76067
          Assignee: systemd-bugs at lists.freedesktop.org
           Summary: Optionally persist unit timestamps to enable
                    anacron-like timers
        QA Contact: systemd-bugs at lists.freedesktop.org
          Severity: enhancement
    Classification: Unclassified
                OS: All
          Reporter: jan.steffens at gmail.com
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: general
           Product: systemd

Anacron-like timers (e.g. "run once a week, doesn't matter when") would require
persistent timestamps in order to cope with reboots and downtimes.

I imagine that would involve keeping unit-like files in /var/lib/systemd/system
(or $XDG_DATA_HOME/systemd/user) saving some of the timestamps with sections
like:

[Persistence]
ActiveEnterTimestamp=...
InactiveEnterTimestamp=...

So that OnUnitActiveSec and OnUnitInactiveSec will be able to fire when the
unit was last activated in a past boot.

Persistence of timestamps for a unit would be enabled if any timer enabling
persistence and referencing the unit is activated.

Of course, anacron supports more features like randomizing start times to
prevent stampeding and limiting the time-of-day range the jobs can be run, but
this would be a nice start.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20140312/e2d684cf/attachment-0001.html>


More information about the systemd-bugs mailing list