[systemd-devel] systemd unit timer

Ronnie Thomas ronnietom at gmail.com
Sun Aug 9 08:04:02 UTC 2020


On Sun, Aug 9, 2020 at 12:20 AM Vini Harimoorthy <vini6452 at gmail.com> wrote:

> Hi Team,
>
>
> Is there a way to specify the "start  date & time" of the timer unit with
> calendar timer  ?
>
> For example, the below timer units runs every weekly from the service is
> activated.My requirement is that I need to run the timer unit only after
> the 10th month i.e."2020-10-1"
>
> [Unit]
> Description=Run foo weekly
>
> [Timer]
> OnCalendar=weekly
> Persistent=true
>
> [Install]
> WantedBy=timers.target
>
>
>
The "weekly" expression is just a shorthand for "Mon *-*-* 00:00:00". So,
instead of
using weekly, you could explicitly specify October, November and December
in your
OnCalendar= statement.  i.e

OnCalendar=Mon *-10,11,12-* 00:00:00

Regards,
Ronnie P. Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200809/4c882d8a/attachment.htm>


More information about the systemd-devel mailing list