Re: delayed start 'on calendar' timers - is it possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Do, 13.12.18 22:06, Kamil Jońca (kjonca@xxxxx) wrote:

> %cat /etc/systemd/system/kjonca-daily.timer
> [Unit]
> Description=kjonca daily
>
> [Timer]
> OnBootSec=0

Well, with this you say that your timer shall be started right after
booting. That's a fixed point in time, and when you start the timer
unit this triggers that the service is immediately started, as systemd
notices that that fixed point in time is already in the past, so it
catches up. Drop this line and things should work.

Note that if you need two timer triggers for the same unit you have
two options: declare them in the same .timer unit file, but then they
are treated as a single object, and hence are activated together and
have all other settings applied to them both. Or you split them into
two timer units, and use Unit= to make sure both start the same
service unit. Then you can have different settings and lifecycles for
both timer units.

Lennart

--
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux