From 38e05ba09f8e06143fba30098f7382a6fa84860c 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 197937a1b69..7a3021e92b0 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' => '*'