From c996cfc820c2757c8e2c815c2ff7c317adb2433d Mon Sep 17 00:00:00 2001 From: Djarran Cotleanu <65814885+djarran@users.noreply.github.com> Date: Wed, 27 Nov 2024 06:31:15 +1000 Subject: [PATCH] Fix #181: Queue adhoc tasks by duration (#183) --- lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.php b/lib.php index ee6e923..dd2efd4 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()) {