cronjobs should run on moodle time, not admin user time

cronjobs should run on moodle time, not admin user time

Penny Leach -
回帖数:1
I've just committed a patch to head that overrides $USER->timezone in cron.php (after $USER is set to get_admin()).

Things that take decisions about what time of day to run (stats - always at the forefront of my mind 熊猫眼) should not be dependent on the timezone of the admin user.

Patch is viewable here:

http://locke.catalyst.net.nz/gitweb?p=moodle.git;a=commitdiff;h=86c0878d42bf58fd996f50813228cfa6e586a17d;hp=212c63dcb53f3f86b82a5ce0314a7b0ec25743a8

Should this go into MOODLE_15_STABLE I think so. Discuss 眨眼
回复Penny Leach

Re: cronjobs should run on moodle time, not admin user time

Pieterjan Heyse -
I agree Penny, the server time is more relevant.
One situation in wich this could be a nice 'feature' is that when the server is located in, for example, the USA, and I, the admin, and most of my users, are in Belgium. I would want the server to do all heavy stuff at 2PM CET and not 2PM US time. If the server would react slow at 2PM US time, it will be around 21:00 here, when student will propably be submitting assignments.