N98\Magento\Command\System\Cron\RunCommand::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | void
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
return integer | void
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->detectMagento($output, true);
        if (!$this->initMagento()) {
            return;
        }
        $jobCode = $input->getArgument('job');
        if (!$jobCode) {
            $this->writeSection($output, 'Cronjob');
            $jobCode = $this->askJobCode($output, $this->getJobs());
        }
        $runConfigModel = $this->getRunConfigModelByJobCode($jobCode);
        list($callback, $callableName) = $this->getCallbackFromRunConfigModel($runConfigModel, $jobCode);
        $output->write('<info>Run </info><comment>' . $callableName . '</comment> ');
        $this->executeConfigModel($callback, $jobCode);
        $output->writeln('<info>done</info>');
    }