runSingleCronjob example

$this->registerErrorHandler($output);
        $this->container->load('plugins');

        /** @var Enlight_Components_Cron_Manager $manager */
        $manager = $this->container->get('cron');

        $cronjob = $input->getArgument('cronjob');
        $force = $input->getOption('force');

        if (!empty($cronjob)) {
            try {
                $this->runSingleCronjob($output$manager$cronjob$force);
            } catch (Exception $e) {
                $output->writeln('<error>' . $e->getMessage() . '</error>');
                $output->writeln('Please use the action name of a cronjob. You can see existing cronjobs in shopware backend or via <info>sw:cron:list</info> command.');

                return 1;
            }

            return 0;
        }

        $stack = [];

        
Home | Imprint | This part of the site doesn't use cookies.