diff --git a/Command/ExecuteCommand.php b/Command/ExecuteCommand.php index 854fcd7a..293925ef 100644 --- a/Command/ExecuteCommand.php +++ b/Command/ExecuteCommand.php @@ -249,6 +249,7 @@ private function executeCommand(ScheduledCommand $scheduledCommand, OutputInterf $this->em = $this->em->create($this->em->getConnection(), $this->em->getConfiguration()); } + $scheduledCommand = $this->em->find(ScheduledCommand::class, $scheduledCommand); $scheduledCommand->setLastReturnCode($result); $scheduledCommand->setLocked(false); $scheduledCommand->setExecuteImmediately(false);