Command/SchedulerProcessCommand.php
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $i                = 0;
        $startMemoryUsage = memory_get_usage(true);

        try {
            do {
                if ($i > 0) {
                    usleep(5000000);
                }

                $i++;
                $this->iterate($input, $output, $startMemoryUsage);
            } while (!$this->getProcessController()->doStop() && (!$input->getOption('iteration') || $i < (int)$input->getOption('iteration')));

            $output->writeln('End of iteration cycle');
        } catch (\Exception $e) {
            $output->writeln(sprintf("<error>KO - %s</error>", $e->getMessage()));
        }
    }
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $i                = 0;
        $startMemoryUsage = memory_get_usage(true);

        try {
            do {
                if ($i > 0) {
                    usleep(5000000);
                }

                $i++;
                $this->iterate($input, $output, $startMemoryUsage);
            } while (!$this->getProcessController()->doStop() && (!$input->getOption('iteration') || $i < (int)$input->getOption('iteration')));

            $output->writeln('End of iteration cycle');
        } catch (\Exception $e) {
            $output->writeln(sprintf("<error>KO - %s</error>", $e->getMessage()));
        }
    }
{@inheritDoc}