LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

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


Hi,
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

Quote:
[Unit]
Description=Timer for mytestprogram

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

[Install]
WantedBy=multi-user.target
Once the first timer fires, the output of systemctl list-timers is as follows:

Code:
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.

Thanks!

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

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Quote:
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:
Code:
[Timer]
OnCalendar=Mon,Wed,Fri *-*-* 10:15:00
Code:
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.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:05 PM.

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