Example of issue:
* 9 * * * echo 9 * 10 * * * echo 10
The above will fire off an email to the user every minute, but all the "9" responses will happen at 10:00AM -> 10:59AM, while the "10"s will come in at 11:00AM->11:59AM.
Running a job of
* * * * * /bin/date ; /bin/date -u
Returned the expected (correct) date and time. this was true for both UTC and local time (America/Denver). Change this job to run every minute at a specific hour results in the offset (jobs told to run at 9 run at 10, etc etc).
Current debug I have completed:
Okay, thats odd. Maybe my timezone file is somehow messed up? Lets check that
diff -s /etc/localtime /usr/share/zoneinfo/`cat /etc/timezone` Files /etc/localtime and /usr/share/zoneinfo/America/Denver are identical
I have checked the hardware clock to see if this is off or somehow disagrees with my local settings (run as root).
date ; hwclock Wed Oct 26 10:50:13 MDT 2016 Wed 26 Oct 2016 10:50:14 AM MDT -0.204171 seconds
Looks to be off by a second, but that shouldn't make my cron jobs run a full hour off schedule, right?
I am also sure of the following:
- Has my timezone changed recently? No
- Did you try manually fixing the timezone anyway? Yes
- Did you reset cron after fixing the timezone? Yes
- Have I made sure that the cron service was restarted? Yes
- Have I restarted the cron service? Yes
- Are you really sure that cron was restarted? 100% sure Cron has been restarted
Other potentially relevant information:
cat /etc/debian_version 8.6
uname -a Linux BigBox 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux
Ran 'hwclock --systohc', not noticeable changes to behavior. Ran this command to check
date;hwclock Wed Oct 26 12:39:09 MDT 2016 Wed 26 Oct 2016 12:39:11 PM MDT -0.875328 seconds
I cannot run 'cat /etc/sysconfig/clock' as this file does not exist. Running a find command under the /etc/ tree to find 'clock' confirms that I have no file by that name there.
Checked to see if anything I am aware of has set the CRON_TZ variable. It is not set at the user level, nor at roots level. Have cron echo them out gives no output.