Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Exporter/AnnotationCronExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use MyBuilder\Bundle\CronosBundle\Annotation\Cron as CronAnnotation;
use MyBuilder\Cronos\Formatter\Cron as CronFormatter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Command\LazyCommand;

class AnnotationCronExporter
{
Expand All @@ -32,6 +33,9 @@ public function export(array $commands, array $options): CronFormatter
$cron = $this->createCronConfiguration();

foreach ($commands as $command) {
if ($command instanceof LazyCommand) {
$command = $command->getCommand();
}
if ($command instanceof Command) {
$cron = $this->parseAnnotations($cron, $command, $options);
}
Expand Down