You are not logged in.

#1 2019-09-12 12:43:26

ali_molaei
Member
From: Iran
Registered: 2015-12-24
Posts: 63
Website

How to make a systemd-timer for every 90sec

How can I use systemd timers or even cron job to repeat a task every 61sec?

I can use OnCalender=*-*-* *:*:00/30 for example to do it every 30sec, but I want to do it for a number that is not fit in 60 seconds, Notice that *-*-* *:00/1:00/1 will fire first time after 61sec and after that it will be every 60sec (I think) because start it just looks at the expresion

Offline

#2 2019-09-12 13:03:50

Swiggles
Member
Registered: 2014-08-02
Posts: 266

Re: How to make a systemd-timer for every 90sec

You can specify multiple OnCalendar entries:

[Timer]
OnCalendar=*-*-* *:1/2:30
OnCalendar=*-*-* *:0/3:00

So this should work unless I made an error with the date syntax.

Edit: The answer below is much better.

Last edited by Swiggles (2019-09-12 13:07:18)

Offline

#3 2019-09-12 13:05:26

fijit
Member
Registered: 2012-07-06
Posts: 24

Re: How to make a systemd-timer for every 90sec

Or just

OnUnitActiveSec=90s

?

Offline

Board footer

Powered by FluxBB