Skip to content

Commit b17548b

Browse files
v1.0.1
1 parent 550ed3a commit b17548b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Command/ListCronTasksCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
2828
];
2929

3030
foreach ($this->getContainer()->get('axiolab.crontask.manager')->findAll() as $task) {
31-
$nextExecutionDT = $task->getLastRun()->add(new \DateInterval($task->getExecutionInterval()));
31+
$nextExecutionDT = $task->getLastRun() ? $task->getLastRun()->add(new \DateInterval($task->getExecutionInterval())) : $task->getFirstRun();
3232
$rows[] = [
3333
$task->getAlias(),
3434
$this->trans('axiolab.crontask.status.'.$task->getCronStatus()),

0 commit comments

Comments
 (0)