[systemd-devel] systemd unit timer
Vini Harimoorthy
vini6452 at gmail.com
Sun Aug 9 10:40:22 UTC 2020
In that case, it will run only in Oct,Nov, & Dec. But, I want to run the
timer unit weekly after a specific calendar date & time.
How to specify if I want to run some task on every 12 hours after Jan'2021
(start from future date & time)
Are the below requirements possible with a systemd timer ?
Let say, Current date & time is : 2020-08-09 12:00:00
1) Run the task every 1 hr starting from tomorrow
2) Run the task every 1 hr after 2020-08-09 15:00:00
3) Run the task on 2nd & 3rd day of the month after 2020-10-01
Basically, I want to specify the future time as start time of the timer
unit and the other specifications mentioned in onCalender has to be
executed after the start time
Thanks,
Vinitha
On Sun, Aug 9, 2020 at 1:34 PM Ronnie Thomas <ronnietom at gmail.com> wrote:
>
> 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
>
>
--
*Regards,*
*Vinitha H*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200809/8bb1c162/attachment.htm>
More information about the systemd-devel
mailing list