LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2014, 02:52 PM   #1
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Rep: Reputation: 5
Cron execution problem


I reset my server clock using tzselect to Americas/Central. Afterwards I reset all my cron jobs to execute at the new times. The crons were executing ok, but not at the new set times. I couldn't figure when they were triggering. I tries testing a cron by setting it to a time that was a few minutes after it was saved, but it wouldn't fire.

10 14 * * * instruction

When the clock displayed 2:10PM, nothing happened.


This kind of cron fired ok (every minute).

*/1 * * * * instruction

Is there something special you have to do or take into consideration after resetting you time? I eventually gave up and went back to zulu and changed every crons back to GMT. The crons are executing at correct times again.
 
Old 06-16-2014, 06:32 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,606

Rep: Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686
Time zones drive me nuts. I am not even sure if tzselect has side effects, that is if it really changes your system clock, or keeps the absolute time constant.

Whatever, you first have to check your real system time with date. Then you know how your computer interprets time. And then you can check /var/log/syslog. You see soon enough on which clock your cron process runs. Especially with the 1 minute trigger.

No, you do not have to alter anything in crontab definitions if you change the time zone. Not as far as I know. Cron should look at system time, not absolute time.

Recommendation: leave your hardware clock and system clock in UTC. Always and forever. Let only the application which shows time to a human (your desktop) make the translation from UTC to local.

jlinkels
 
Old 06-16-2014, 07:19 PM   #3
battles
Member
 
Registered: Apr 2014
Distribution: Debian GNU/Linux 7.5 (wheezy)
Posts: 231

Original Poster
Rep: Reputation: 5
I did look at 'date' and it said that the time was CST - what I changed it to. I am used to using GMT from ham radio operations, so I will just stick with it.
Thanks.
 
  


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
cron execution using command line desiretolearn Linux - Newbie 5 02-05-2014 12:46 PM
[SOLVED] Cron jobs execution order chicken76 Linux - Newbie 2 04-20-2013 06:16 AM
cron execution and command access champak Programming 2 11-29-2007 05:50 AM
Change Execution Time for cron.* Rednarb Ubuntu 2 03-27-2007 03:27 PM
randomizing execution of some cron entries markus1982 Linux - General 2 06-28-2003 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration