MDL-74242 admin: Check for available updates daily on random time

It's been a mistake to make every Moodle site out there to check for
available update every two hours, on the hour. We are experiencing
server load peaks that are harder and harder to deal with.

The patch addresses this by (1) checking for available updates just once
a day and (2) distributing the checking times randomly around the clock.

This is a backport of MDL-73748 already present in 3.11.
This commit is contained in:
David Mudrák
2022-03-20 17:06:51 +01:00
parent e9f0baf90e
commit 04d4cbde78
+2 -2
View File
@@ -242,8 +242,8 @@ $tasks = array(
array(
'classname' => 'core\task\check_for_updates_task',
'blocking' => 0,
'minute' => '0',
'hour' => '*/2',
'minute' => 'R',
'hour' => 'R',
'day' => '*',
'dayofweek' => '*',
'month' => '*'