[systemd-devel] Timer: time format

Michael Chapman mike at very.puzzling.org
Tue Aug 23 13:39:54 UTC 2016


On Tue, 23 Aug 2016, arnaud gaboury wrote:
> I am really sorry for this post as this may sound like a trivial one,
> but honestly the timer topic is difficult to understand for me (at
> least the time format).
>
> I am looking to run a service twice a day, never mind the time. I
> understand I must use OnCalendar, but I have no idea for the rest.

You may find it more convenient to use the other On* directives.

For example:

   OnBootSec=1h
   OnUnitActiveSec=12h

will trigger the associated service an hour after booting the system, and 
every 12 hours therafter. Take a look at the RandomizedDelaySec= and 
AccuracySec= directives too, to further specify how accurate the timer 
should be.

- Michael


More information about the systemd-devel mailing list