Skip to content
Permalink
Browse files

MDL-48442 tasks: Make sure first run is as per schedule

  • Loading branch information...
ankitagarwal committed Dec 22, 2014
1 parent eb1dc9f commit 4047cd751fece2db868184a14a5101bff2b07322
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/classes/task/manager.php
@@ -99,6 +99,9 @@ public static function reset_scheduled_tasks_for_component($componentname) {
$classname = '\\' . $classname;
}
// For tasks, the first run should also follow the schedule.
$task->set_next_run_time($task->get_next_scheduled_time());
// If there is an existing task with a custom schedule, do not override it.
$currenttask = self::get_scheduled_task($classname);
if ($currenttask && $currenttask->is_customised()) {

0 comments on commit 4047cd7

Please sign in to comment.
You can’t perform that action at this time.