crontabManager = $crontabManager; parent::__construct(); } /** * {@inheritdoc} */ protected function configure() { $this->setName('cron:remove') ->setDescription('Removes tasks from crontab'); parent::configure(); } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { try { $this->crontabManager->removeTasks(); } catch (LocalizedException $e) { $output->writeln('' . $e->getMessage() . ''); return Cli::RETURN_FAILURE; } $output->writeln('Magento cron tasks have been removed'); return Cli::RETURN_SUCCESS; } }