Recent Topics

1 Sep 29, 2013 19:27    

Since upgrading to 5.x (5.0.5, now at 5.0.6), I've been seeing my cron jobs fire at weird times....jobs that shouldn't fire for hours are running.

Its not using server time, my time or UTC....

I ran cron_exec without -q...and it picked up a task:

[bigtop]$ php cron_exec.php

Requesting lock on task #4143 [Send reminders about unread messages]

Starting task #4143 [Send reminders about unread messages] at 19:40:31.

Task finished at 19:40:31 with status: finished
Message: It was not necessary to send any reminder!
[bigtop]$ date
Sun Sep 29 08:40:42 PDT 2013

Aha, if I don't set a default_timezone, it uses Europe/Paris....but its added time_difference (taking servertime in PDT to my time CDT)...so its running cronjobs from CLI in Moscow time. But, when cron_exec.php is called by web, it runs in my local timezone (CDT).

So, I have to set default_timezone to be 'America/Los_Angeles' to get cron_exec.php invoked by cron by my hosting provider to run in the 'America/Chicago' timezone.

And, since times are right when its running through web...the installer didn't tell me that I need to set something in _advanced.php

And, its because with my provider, command line php is 5.2 and its php.ini doesn't have anything set for date.timezone, while the web is using php 5.3 and its php.ini does.

The comment doesn't say that $date_default_timezone is set to server timezone, instead of your timezone.

Guessing this problem has been there since my hosting provider has gone to cramming more customers on to bigger machines, due to IPv4 depletion. I just didn't notice, because I didn't have a reason to see when my daily/weekly jobs were running...which have always had a drift to them, because they are rescheduled 1 day or 7 days from when the task ended...rather than when it started. And, I evidently changed my cron interval from every 5 minutes to hourly.

The Dreamer

2 Oct 04, 2013 20:34

Hello @thedreamer,

Thanks for your report, we are taking care of this situation and will come back to you with news about it.


Form is loading...