From 20797726bbda450e70f6fe0827c5f9152dd5b036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Sun, 6 Feb 2022 21:53:44 +0100 Subject: [PATCH] MDL-73748 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. --- lib/db/tasks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/db/tasks.php b/lib/db/tasks.php index 9393cfca996..e74d181b186 100644 --- a/lib/db/tasks.php +++ b/lib/db/tasks.php @@ -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' => '*'