MDL-47221 task: allow 'random' time definitions
authorDan Poltawski <dan@moodle.com>
Sat, 27 Sep 2014 20:22:57 +0000 (21:22 +0100)
committerDan Poltawski <dan@moodle.com>
Sun, 5 Oct 2014 13:25:44 +0000 (14:25 +0100)
commit516ea6cf8b5650ac086630b3f4c609a09a685040
treed024a370fb61647fc62b2e7fa413b56305bd6453
parent6597413d41fd3f47d078baa2152f0219f8a463f8
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.
lib/classes/task/scheduled_task.php
lib/tests/scheduled_task_test.php
lib/upgrade.txt