MDL-70520 tasks: Keep lastruntime when a scheduled task is reset

This commit is contained in:
Mikhail Golenkov
2020-12-22 10:37:43 +11:00
parent 4ec279a2f0
commit eb694bdd5a
2 changed files with 21 additions and 0 deletions
+1
View File
@@ -229,6 +229,7 @@ class manager {
$record = self::record_from_scheduled_task($task);
$record->id = $original->id;
$record->nextruntime = $task->get_next_scheduled_time();
unset($record->lastruntime);
$result = $DB->update_record('task_scheduled', $record);
return $result;