Hello, I have recently noticed that my cron usually runs 10 hours earlier (or 14 hours later) than the specified time. Instead of every 23rd hour of the day, it was executed at 13th hour of the server time.
I looked into the cron's logfile, and realized that while the crons were executed at the right time (by directadmin's standard), they were not the same time as the server. Ie Directadmin seems to be running on a different timezone for some reason. I found out about the time discrepancy because my cron was recording the time updated to a mysql database, and I was reading through the log on the database.
I did a further investigation to make sure that the time discrepancy wasn't due to any mysql problem. For example, right now it's only 14:34, and the cron for 23:51 was already executed at 13.51. In the cron log however, it is recorded as being executed at 23:51. Now while it is supposed to be 14.34, somehow in the cron log, the day has just begun at around 00:34.
In case I am confusing anybody, let me try to make it simpler.
Time now = 14.34.
Server time = 14.34.
Cron's log time = 00.34.
Cron was supposed to be executed at 23.51 server time.
But it was executed at 13.51 server time.
However, 13.51 server time shows at 23.51 in cron's log.
I have checked that the server time is accurate. So the only thing left now that may be of problem is Directadmin or the cron daemon and if either of them uses internal clock. I have see that there are at least two other people in this forum having similar problems. Their threads however give no information.
Anyone has any ideas if this could be a bug?
I looked into the cron's logfile, and realized that while the crons were executed at the right time (by directadmin's standard), they were not the same time as the server. Ie Directadmin seems to be running on a different timezone for some reason. I found out about the time discrepancy because my cron was recording the time updated to a mysql database, and I was reading through the log on the database.
I did a further investigation to make sure that the time discrepancy wasn't due to any mysql problem. For example, right now it's only 14:34, and the cron for 23:51 was already executed at 13.51. In the cron log however, it is recorded as being executed at 23:51. Now while it is supposed to be 14.34, somehow in the cron log, the day has just begun at around 00:34.
In case I am confusing anybody, let me try to make it simpler.
Time now = 14.34.
Server time = 14.34.
Cron's log time = 00.34.
Cron was supposed to be executed at 23.51 server time.
But it was executed at 13.51 server time.
However, 13.51 server time shows at 23.51 in cron's log.
I have checked that the server time is accurate. So the only thing left now that may be of problem is Directadmin or the cron daemon and if either of them uses internal clock. I have see that there are at least two other people in this forum having similar problems. Their threads however give no information.
Anyone has any ideas if this could be a bug?