Anonymous | Login | Signup for a new account | 2021-01-20 10:17 GMT | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0000577 | SiT! | scheduler | public | 2009-03-18 18:17 | 2009-10-15 21:55 | ||||
Reporter | anonymous | ||||||||
Assigned To | ivan | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | 3.45 | ||||||||
Target Version | 3.50 | Fixed in Version | 3.50 | ||||||
Summary | 0000577: Scheduler not running when local time zone is different than server time zone. | ||||||||
Description | When the local time is different to the server time zone the scheduer doesn't run as expected. For example ... If the local time is 7pm, and the server time in 12pm auto.php runs ... set's the next run time (for inbound email) to be 7.01 pm. on it's next run ... it checks the next run time (7.01pm) against the server time (12.01pm) and doesn't do anything. The script will eventually run correctly when the server time reaches 7.01pm. (I presume if the time different is the other way around some scripts will run too often) My local time zone is GMT+0 my hosted server is GMT-7. When the script runs it updates the next run time to be my local time + 1 minute, cron runs auto.php every minute but auto.php won't do anything because the next run time is 7 hours away. I've tried changing the shell time zone with export TZ=GMT+0 I've tired changing the php time zone using putenv("TZ=EUROPE/DUBLIN"); Any other suggestions? Thanks. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
![]() |
||||||
|
![]() |
|
ivan (administrator) 2009-08-15 13:31 |
The sit timezone setting "System Time Zone" should be set to match your server timezone. Set the timezone in your user profile(s) to the 'local timezone'. You should find this fixes the issues you're having. We should add a setting for 'default user timezone' to make this easier in future. |
ivan (administrator) 2009-08-20 12:04 |
Mikail on IRC had this same problem and I connected in to have a look. It does appear that there is an issue here, sorry that I dismissed it so quickly. |
kieran (administrator) 2009-09-09 18:15 |
I might be going mad but I'm not sure if this is to do with timezones at all, I'm getting the same problem. Diving into the code: $sql = "SELECT * FROM `{$dbScheduler}` WHERE status = 'enabled' AND type = 'interval' "; $sql .= "AND UNIX_TIMESTAMP(start) <= $now AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) = 0) "; $sql .= "AND IF(UNIX_TIMESTAMP(lastran) > 0, UNIX_TIMESTAMP(lastran) + `interval` <= $now, UNIX_TIMESTAMP(NOW())) "; $sql .= "AND laststarted <= lastran"; The last two lines of this query make it so I never get any results returned, removing them seems to return the right results. Additionally, the query in schedule_action_done() doesn't seem to work for me, it never updates a task even though it completes. Running the SQL by hand doesn't either but the SQL looks fine. |
ivan (administrator) 2009-09-10 01:06 |
Yeah your right not going mad. I fixed this dunno where the fix is thou right now. |
ivan (administrator) 2009-09-10 13:18 |
This was fixed in http://github.com/ericthefish/sitracker/commit/9bb610e79d4374b9985ff582c52c330f089e6701 [^] Not sure how I get this into the 3.x branch now, help! |
ivan (administrator) 2009-09-10 14:23 |
This rapidshare link contains a version of functions.inc.php that has this patch http://rs742l3.rapidshare.com/cgi-bin/upload.cgi?rsuploadid=158970025334601550 [^] |
(0001924) codemonkey (updater) 2009-09-10 20:05 |
This issue was mentioned in a commit by Ivan Lucas in commit 19e20c20709a54c4f436afd7308ebb89b1c7d584 http://github.com/sitracker/sitracker/commit/19e20c20709a54c4f436afd7308ebb89b1c7d584 [^] Fix a timezone issue when marking scheduler actions as done, this should fix Mantis bug 577 |
ivan (administrator) 2009-09-10 20:07 |
Branch: refs/heads/sitracker3 Home: http://github.com/sitracker/sitracker [^] Commit: 23b79d5954df13bcb47916ea26b6ed52146afd25 http://github.com/sitracker/sitracker/commit/23b79d5954df13bcb47916ea26b6ed52146afd25 [^] Author: Ivan Lucas <ivan@sitracker.org> Date: 2009-09-10 (Thu, 10 Sep 2009) Changed paths: M scheduler.php Log Message: ----------- Added a legend to the Scheduler page, the colours have been confusing people for a while now Commit: 19e20c20709a54c4f436afd7308ebb89b1c7d584 http://github.com/sitracker/sitracker/commit/19e20c20709a54c4f436afd7308ebb89b1c7d584 [^] Author: Ivan Lucas <ivan@sitracker.org> Date: 2009-09-10 (Thu, 10 Sep 2009) Changed paths: M lib/functions.inc.php Log Message: ----------- Fix a timezone issue when marking scheduler actions as done, this should fix Mantis bug 577 |
ivan (administrator) 2009-10-01 21:09 |
There do appear to be issues with this still, need to look into it before 3.50 is released. |
ivan (administrator) 2009-10-03 11:42 |
I've spent some time trying to get this to fail and I can't. So I'm going to have to treat it fixed until somebody can give me some more info about any remaining issues. |
kieran (administrator) 2009-10-03 13:54 |
According to the commits, nothing has been touched in schedule_action_done()? There's a bug in the code that wasn't updating any tasks for me. |
(0002063) codemonkey (updater) 2009-10-04 14:23 |
This issue was mentioned in a commit by Ivan Lucas in commit acddd36eef1a16a6cd7bd788954538a83acd14af http://github.com/sitracker/sitracker/commit/acddd36eef1a16a6cd7bd788954538a83acd14af [^] Fix bug 972 timezone issues. This may also affect some issues reported under bug 577 |
![]() |
|||
Date Modified | Username | Field | Change |
2009-03-18 18:17 | anonymous | New Issue | |
2009-08-15 13:31 | ivan | Note Added: 0001543 | |
2009-08-15 13:31 | ivan | Status | new => feedback |
2009-08-15 13:33 | ivan | Relationship added | related to 0000864 |
2009-08-20 12:04 | ivan | Note Added: 0001795 | |
2009-08-20 12:04 | ivan | Status | feedback => confirmed |
2009-08-20 12:04 | ivan | Target Version | => 3.50 |
2009-08-20 12:04 | ivan | Description Updated | View Revisions |
2009-08-22 10:17 | ivan | Status | confirmed => assigned |
2009-08-22 10:17 | ivan | Assigned To | => ivan |
2009-09-09 18:15 | kieran | Note Added: 0001918 | |
2009-09-10 01:06 | ivan | Note Added: 0001919 | |
2009-09-10 13:18 | ivan | Note Added: 0001920 | |
2009-09-10 14:23 | ivan | Note Added: 0001923 | |
2009-09-10 20:05 | codemonkey | Checkin | |
2009-09-10 20:05 | codemonkey | Note Added: 0001924 | |
2009-09-10 20:07 | ivan | Note Added: 0001925 | |
2009-09-10 20:07 | ivan | Status | assigned => resolved |
2009-09-10 20:07 | ivan | Resolution | open => fixed |
2009-09-10 20:07 | ivan | Fixed in Version | => Current SVN |
2009-09-12 12:06 | ivan | Fixed in Version | Current SVN => 3.50 |
2009-10-01 21:09 | ivan | Note Added: 0002058 | |
2009-10-03 11:42 | ivan | Note Added: 0002059 | |
2009-10-03 13:54 | kieran | Note Added: 0002060 | |
2009-10-04 14:23 | codemonkey | Checkin | |
2009-10-04 14:23 | codemonkey | Note Added: 0002063 | |
2009-10-15 21:55 | ivan | Status | resolved => closed |
Copyright © 2000 - 2021 MantisBT Team |