[systemd-devel] Add timer exception
Andy Pieters
systemd at andypieters.me.uk
Mon Nov 5 09:58:37 UTC 2018
On Mon, Nov 5, 2018 at 10:05 AM Jérémy Rosen <jeremy.rosen at smile.fr> wrote:
> I would have my timer be duration-based instead of calandar based
> (assuming that fits your need)
>
> You could use one of the following
>
> OnActiveSec=48h (two days after the timer last triggered
> OnUnitActiveSec=48h (two days afte the unit was last started)
>
> Or slightly different
>
> OnUnitInactiveSec=24h (one day after the service FINISHED)
>
> In all those cases, since this is interval based, you would need a way to
> "prime the pump" I usually do this with
>
> OnStartupSec=15m (1/4h after the machine was started)
>
> or simply by enabling the service itself so it's part of the boot sequence
> (this will work with OnUnitActive and OnUnitInactive, but not with OnActive)
>
Ok but I don't want to have to wait until 3.30AM to manually prime the
thing, and I don't want to start it outside of its normal run window...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20181105/010e21d7/attachment.html>
More information about the systemd-devel
mailing list