Re: systemd unit timer

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

 



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@xxxxxxxxx> wrote:

On Sun, Aug 9, 2020 at 12:20 AM Vini Harimoorthy <vini6452@xxxxxxxxx> 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

_______________________________________________
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