public function CronFrequency::run in Automatic Updates 8
Run check.
Return value
array An array of translatable strings.
Overrides ReadinessCheckerInterface::run
File
- src/
ReadinessChecker/ CronFrequency.php, line 51
Class
- CronFrequency
- Cron frequency checker.
Namespace
Drupal\automatic_updates\ReadinessCheckerCode
public function run() {
$messages = [];
if ($this->moduleHandler
->moduleExists('automated_cron') && $this->configFactory
->get('automated_cron.settings')
->get('interval') > $this::MINIMUM_CRON_INTERVAL) {
$messages[] = $this
->t('Cron is not set to run frequently enough. <a href="@configure">Configure it</a> to run at least every 3 hours or disable automated cron and run it via an external scheduling system.', [
'@configure' => Url::fromRoute('system.cron_settings')
->toString(),
]);
}
return $messages;
}