diff --git a/public/lib/classes/task/manager.php b/public/lib/classes/task/manager.php index 2fc45ec0c99..4ab7d573231 100644 --- a/public/lib/classes/task/manager.php +++ b/public/lib/classes/task/manager.php @@ -1473,6 +1473,9 @@ class manager { $task = self::scheduled_task_from_record($taskrecord); $task->set_lock($lock); + $displayname = $task->get_name() . ' (' . get_class($task) . ')'; + mtrace("Marking orphaned scheduled task as failed: $displayname"); + // We have to skip log finalisation when failing the task as the finalise_log method from // the log manager is only aware of the current running task (i.e., the cleanup task). self::scheduled_task_failed($task, false); @@ -1488,6 +1491,9 @@ class manager { $task = self::adhoc_task_from_record($taskrecord); $task->set_lock($lock); + $displayname = get_class($task) . ' (adhoc task id ' . $task->get_id() . ')'; + mtrace("Marking orphaned adhoc task as failed: $displayname"); + // We have to skip log finalisation when failing the task as the finalise_log method from // the log manager is only aware of the current running task (i.e., the cleanup task). self::adhoc_task_failed($task, false); diff --git a/public/lib/db/tasks.php b/public/lib/db/tasks.php index 2ef837ca2ad..4bfb9df1418 100644 --- a/public/lib/db/tasks.php +++ b/public/lib/db/tasks.php @@ -413,8 +413,8 @@ $tasks = array( [ 'classname' => 'core\task\task_lock_cleanup_task', 'blocking' => 0, - 'minute' => 'R', - 'hour' => '0', + 'minute' => '*/10', + 'hour' => '*', 'day' => '*', 'dayofweek' => '*', 'month' => '*'