23.08.2016 16:55, arnaud gaboury пишет:
On Tue, Aug 23, 2016 at 3:52 PM, arnaud gaboury
<arnaud.gabo...@gmail.com> wrote:
On Tue, Aug 23, 2016 at 3:39 PM, Michael Chapman <m...@very.puzzling.org> wrote:
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
Thank you for all these answers. In fact, without having a look at my
emails, I finally found this solution (which is correct accordingly
what I read):
OnUnitActiveSec=12h

Do I have to add:
Persistent=true
NO

"Persistent=true" is needed, when critical task executing was missed in some 
reason. By default Persistent=no, so, you may not to specify it in your .timer file 
explicitly. Otherwise, yes, you need to specify Persistent=true
 in your .timer file explicitly.




and an OnBootSec entry ?

It's useful, if you wish to execute your task, when computer (server) is after reboot or being off.



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


--

google.com/+arnaudgabourygabx



_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to