From 451ae847e228ef3f9ded9e893eac4d18d12a0681 Mon Sep 17 00:00:00 2001 From: djarrancotleanu Date: Wed, 20 Nov 2024 14:50:05 +1000 Subject: [PATCH] Fix #181: Queue adhoc tasks by duration --- lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.php b/lib.php index 895c0d7..c1f5ace 100644 --- a/lib.php +++ b/lib.php @@ -190,7 +190,7 @@ function reengagement_crontask() { INNER JOIN {course_modules} cm on cm.instance = r.id JOIN {modules} m on m.id = cm.module WHERE m.name = 'reengagement' AND cm.deletioninprogress = 0 - ORDER BY r.id ASC"; + ORDER BY r.duration ASC"; $reengagements = $DB->get_recordset_sql($reengagementssql); if (!$reengagements->valid()) {