You are not logged in.

#1 2016-03-01 16:30:20

chapatt
Member
Registered: 2010-12-23
Posts: 24

[SOLVED] Systemd Timer Next Run is Always Tomorrow

Hi, I'm trying to run a timer daily at 22:00:00 localtime, but when I do, list-timers it always shows that it will next run tomorrow at 22:00:00, not today. Btw, this machine is shutdown daily at 01:00:00 by another systemd timer that _does_ work (I'm assuming because 01:00:00 _is_ tomorrow).

Here is my timer:

[Unit]
Description=Run daily at 22:00

[Timer]
OnCalendar=*-*-* 22:00:00

[Install]
WantedBy=timers.target

and here is systemctl list-timers:

NEXT                         LEFT           LAST                         PASSED 
Wed 2016-03-02 01:00:00 EST  13h left       n/a                          n/a    
Wed 2016-03-02 22:00:00 EST  1 day 10h left n/a                          n/a

I figure I must be missing something obvious, but I've read all the docs and can't find anything about other people running into this issue.

Last edited by chapatt (2016-03-01 18:38:58)

Offline

#2 2016-03-01 17:50:16

ajbibb
Member
Registered: 2012-02-12
Posts: 142

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

I'm not sure that you are missing anything.  I've been wrestling with this issue for the past week, but really haven't had enough time to devote to it until this morning.  I can't find any OnCalendar= setting that will start in less than 24 hours.  I think something changed in an update a week ago since these timer units had been functioning properly for well over a year.  They seemed to start this behavior roughly around 2/22.

As an experiment I've reset the timers to trigger with OnBootSec=5h and OnBootSec=14h (I've got 2 timers not working).  I'd rather have OnCalendar, but if this works I'll live with it.  I'm right now waiting for the first one to fire, which should be in about two hours.

Offline

#3 2016-03-01 18:00:00

chapatt
Member
Registered: 2010-12-23
Posts: 24

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

I'm not sure if I'm happy someone else has the same issue, or afraid that it's a bug that appeared a week ago and somehow hasn't been widely realized yet.

Anyone else? I have an hour free, so I'll do some more research.

Offline

#4 2016-03-01 18:02:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,604

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

Offline

#5 2016-03-01 18:37:16

chapatt
Member
Registered: 2010-12-23
Posts: 24

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

Thank you, Scimmia! This seems like a crazy bug to make it into a stable release. I guess v230 will have the fix.

Today sounds like a nice day to switch all my machines to sysvinit and OpenRC!

Offline

#6 2016-03-01 23:34:23

damjan
Member
Registered: 2006-05-30
Posts: 452

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

chapatt wrote:

Today sounds like a nice day to switch all my machines to sysvinit and OpenRC!

cause they have better timer implementation???

Offline

#7 2016-03-02 01:59:26

chapatt
Member
Registered: 2010-12-23
Posts: 24

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

Because this is a scary sort of thing to be found in a supposedly stable release of a _very_ fundamental part of an OS. I'm obviously switching this task to a normal cron job anyway.

Last edited by chapatt (2016-03-02 01:59:59)

Offline

#8 2016-03-02 05:14:18

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

You can use cron with systemd.

And if you're afraid of bugs in fundamental parts of the system, don't look at the kernel bug tracker. tongue

Moving from System Administration to Newbie Corner.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#9 2016-03-12 19:34:48

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [SOLVED] Systemd Timer Next Run is Always Tomorrow

This seems like a crazy bug to make it into a stable release.
...
...can't find anything about other people running into this issue.

I have the same issue and can't recon why there is such silence about it (e.g. no announcements on the front page). Important scripts on my machine have ceased to work.

This thread is marked as solved: what is solution, BTW? This:

Today sounds like a nice day to switch all my machines to sysvinit and OpenRC!

ot this:

I guess v230 will have the fix.

?


bing different

Offline

Board footer

Powered by FluxBB