Skip to content

Commit

Permalink
Merge pull request #126 from sctt/master
Browse files Browse the repository at this point in the history
force status refresh before command execution
  • Loading branch information
j-guyon committed Dec 24, 2018
2 parents c5ce339 + 7281298 commit 6150aae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Command/ExecuteCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
$noneExecution = true;
foreach ($commands as $command) {

$this->em->refresh($this->em->merge($command));
if ($command->isDisabled() || $command->isLocked()) {
continue;
}

/** @var ScheduledCommand $command */
$cron = CronExpression::factory($command->getCronExpression());
$nextRunDate = $cron->getNextRunDate($command->getLastExecution());
Expand Down

0 comments on commit 6150aae

Please sign in to comment.