Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/code/Magento/Cron/Console/Command/CronCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritDoc
*/
protected function configure()
{
Expand All @@ -86,10 +86,16 @@ protected function configure()
/**
* Runs cron jobs if cron is not disabled in Magento configurations
*
* {@inheritdoc}
* @param InputInterface $input
* @param OutputInterface $output
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
// Tasks run via cron are slightly less important than website visitors.
if (function_exists('proc_nice')) {
proc_nice(5);
}

if (!$this->deploymentConfig->get('cron/enabled', 1)) {
$output->writeln('<info>' . 'Cron is disabled. Jobs were not run.' . '</info>');
return;
Expand Down