Commit Graph

10 Commits

Author SHA1 Message Date
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
f47e4eb4a0 MDL-49070 core_registration: improved site registration scheduled task 2015-03-20 14:22:39 +08:00
16078807f8 MDL-47221 task: allow 'random' time definitions
When working against external services it can be advantageous to not
have automated tasks all hit the service at the exact same time from
many different installations.

This change allows the use of 'R' in hour/minute fields of the scheduled
task definition so a task will be installed with a 'random' hour/minute
value for these sort of occasions.

Note that the task will be installed in the database with a defined
time, this simply randomises the time chosen when loading from the
definiton.
2014-10-05 14:27:04 +01:00
fd57c17e2d MDL-46207 Tasks: Do not run tasks if their component is disabled.
This can be overridden on a per task basis by implementing:
get_run_if_component_disabled() in the scheduled task.
2014-07-21 15:01:54 +08:00
dc561732b5 MDL-45813 Fix variable name in scheduled task 2014-06-09 09:46:13 +02:00
0a5aa65b53 MDL-44733 add support for disabling of scheduled tasks 2014-03-28 10:23:37 +08:00
b7f7c3bcf2 MDL-44639 fix some phpdocs issues in tasks classes
There is also one extra () to improve code readability.
2014-03-20 17:32:56 +08:00
bbd9226cb8 MDL-44608 Scheduled Tasks: Use $CFG->timezone if it is set to schedule tasks 2014-03-14 11:47:03 +08:00
76e4de31cc MDL-25505 Tasks: Fix for scheduled task bug on the last day of the month.
On the last day of the month, the scheduled task next time calculation was wrapping
to the 0th day of the month (which is not a valid day).
2014-02-28 13:14:58 +08:00
309ae8921f MDL-25499: Centralise management of all types of cron tasks
Centralise management of all types of cron tasks with registration, scheduling,
parallel task conflicts(blocking) and running once off tasks, all using an
administration screen.

This is a combination of several issues:

MDL-25502: Added "black magic" task allocator for cron
MDL-25503: Add step to cron to run all scheduled tasks
MDL-25504 cron: Refactor to use scheduler
MDL-25505: Add an admin interface to schedule tasks via cron.
MDL-25507: Add support for adhoc tasks.
2014-02-26 12:03:46 +08:00