Merge branch 'MDL-66927-run-new-adhoc' of https://github.com/brendanheywood/moodle
authorJun Pataleta <jun@moodle.com>
Thu, 24 Oct 2019 05:45:27 +0000 (13:45 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 24 Oct 2019 05:45:27 +0000 (13:45 +0800)
lib/cronlib.php

index 8de7602..c735ac2 100644 (file)
@@ -151,7 +151,7 @@ function cron_run_adhoc_tasks(int $timenow) {
 
     // Run all adhoc tasks.
     while (!\core\task\manager::static_caches_cleared_since($timenow) &&
-            $task = \core\task\manager::get_next_adhoc_task($timenow)) {
+            $task = \core\task\manager::get_next_adhoc_task(time())) {
         cron_run_inner_adhoc_task($task);
         unset($task);