13 Commits

Author SHA1 Message Date
Petr Skoda
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
Rajesh Taneja
d83a1c11a2 MDL-48605 unit_test: Only touch real file/dir 2015-03-31 21:45:23 +08:00
Andrew Davis
f47e4eb4a0 MDL-49070 core_registration: improved site registration scheduled task 2015-03-20 14:22:39 +08:00
Frederic Massart
0af336ef93 MDL-47529 task: Do not use lock when updating task records 2015-02-12 11:16:20 +08:00
Adrian Greeve
b49964f7fc MDL-48252 scheduled tasks: Unit test for file_temp_cleanup_task. 2014-11-20 10:35:47 +08:00
Damyon Wiese
852ff0372f MDL-47499 tasks: Scheduled tasks custom schedule is reset on upgrade.
Add a unit test for reset_scheduled_tasks_for_component and make sure it doesn't clear
customised schedules for existing tasks.
2014-10-14 14:59:24 +08:00
Dan Poltawski
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
Damyon Wiese
a0ac406055 MDL-46904 core_task: Gracefully handle rubbish entries in the tasks table. 2014-08-20 17:01:15 +08:00
David Mudrák
dc561732b5 MDL-45813 Fix variable name in scheduled task 2014-06-09 09:46:13 +02:00
Petr Škoda
0a5aa65b53 MDL-44733 add support for disabling of scheduled tasks 2014-03-28 10:23:37 +08:00
Damyon Wiese
9be8583ac5 MDL-44608 task scheduler: Make unit test case insensitive 2014-03-19 09:24:50 +08:00
Damyon Wiese
bbd9226cb8 MDL-44608 Scheduled Tasks: Use $CFG->timezone if it is set to schedule tasks 2014-03-14 11:47:03 +08:00
Damyon Wiese
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