function CronCommand::__invoke
Same name and namespace in other branches
- main core/modules/system/src/Command/CronCommand.php \Drupal\system\Command\CronCommand::__invoke()
Runs cron implementations.
File
-
core/
modules/ system/ src/ Command/ CronCommand.php, line 36
Class
- CronCommand
- Runs cron implementations.
Namespace
Drupal\system\CommandCode
public function __invoke(InputInterface $input, OutputInterface $output) : int {
$io = new SymfonyStyle($input, $output);
if ($this->cron
->run()) {
$io->success('Cron ran successfully.');
return Command::SUCCESS;
}
$io->error('Cron run failed.');
return Command::FAILURE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.