diff --git a/Command/CustomItemsScheduledExportCommand.php b/Command/CustomItemsScheduledExportCommand.php index 74e4e74a5..c3eeae29a 100644 --- a/Command/CustomItemsScheduledExportCommand.php +++ b/Command/CustomItemsScheduledExportCommand.php @@ -52,8 +52,13 @@ protected function configure(): void protected function execute(InputInterface $input, OutputInterface $output): int { - $ids = $this->formatterHelper->simpleCsvToArray($input->getOption('ids'), 'int'); - $customItemExportSchedulers = $this->customItemExportSchedulerModel->getRepository()->findBy(['id' => $ids]); + if ($ids = $input->getOption('ids')) { + $ids = $this->formatterHelper->simpleCsvToArray($ids, 'int'); + $customItemExportSchedulers = $this->customItemExportSchedulerModel->getRepository()->findBy(['id' => $ids]); + } else { + $customItemExportSchedulers = $this->customItemExportSchedulerModel->getRepository()->getEntities(); + } + $count = 0; foreach ($customItemExportSchedulers as $customItemExportScheduler) {