Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-29-2017, 07:41 AM   #1
LQ Newbie
Registered: May 2017
Posts: 1

Rep: Reputation: Disabled
Systemd v219 timer not calculating correct next date on RHEL 7.2?

I'm trying to create a systemd timer to restart a corresponding service based on a specific calendar format.

When I enable and start the timer, the first trigger fires correctly and the service is re-started, but the next timer date isn't updated and never triggers again.

Here's my timer definition:
note: the date below is currently arbitrary -- once I figure out how this works the actual values wanted will be used

Description=Timer for mytestprogram

OnCalendar=Mon,Wed,Fri *-*-* 6:50:00

Once the first timer fires, the output of systemctl list-timers is as follows:

NEXT                         LEFT      LAST                         PASSED              UNIT                      ACTIVATES
Mon 2017-05-29 06:50:00 CDT  35min ago Mon 2017-05-29 06:50:00 CDT  35min ago           mytestprogram.timer       mytestprogram.service
As you can see, the timer executed on Monday, May 29th and the next trigger date is not updated -- I was expecting the NEXT trigger to be updated to Wed 2017-05-31 06:50:00 CDT.

Is there something wrong with my OnCalendar date?

The way I understand it, the timer should fire on Monday, Wednesday and Friday every week at 6:50AM.

I'm running systemd 219 on RHEL 7.2.


Last edited by sjnorman; 05-29-2017 at 07:43 AM.
Old 05-29-2017, 10:25 AM   #2
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Originally Posted by sjnorman View Post
Is there something wrong with my OnCalendar date?
Looked okay to me so I tried it out by changing the time:
OnCalendar=Mon,Wed,Fri *-*-* 10:15:00
Wed 2017-05-31 10:15:00 CDT  1 day 23h left Mon 2017-05-29 10:15:01 CDT  1s ago       mytestprogram.timer          mytestprogram.service
No idea what the problem is though.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regular backup by date. Please correct me the command Bullz3y3 Linux - Server 4 03-10-2012 11:23 AM
are linux date/time stamps correct? Trio3b Linux - General 4 11-18-2010 11:49 AM
[SOLVED] Correct en_NZ locale, but date format is incorrect go_player Linux - Newbie 1 07-03-2009 05:09 PM
what is the correct syntax order for tar with --after-date DATE, --newer DAT farhan Linux - General 1 03-16-2007 08:43 AM
time and date not correct, after reboot vasanthraghavan Linux - General 4 03-10-2005 11:55 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration