diff --git a/app/code/Magento/Cron/Console/Command/CronCommand.php b/app/code/Magento/Cron/Console/Command/CronCommand.php index 142a9a397eb5f..91129e8d63185 100644 --- a/app/code/Magento/Cron/Console/Command/CronCommand.php +++ b/app/code/Magento/Cron/Console/Command/CronCommand.php @@ -59,7 +59,7 @@ public function __construct( } /** - * {@inheritdoc} + * @inheritDoc */ protected function configure() { @@ -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('' . 'Cron is disabled. Jobs were not run.' . ''); return;