You are here

protected function Cron::invokeCronHandlers in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Cron.php \Drupal\Core\Cron::invokeCronHandlers()

Invokes any cron handlers implementing hook_cron.

1 call to Cron::invokeCronHandlers()
Cron::run in core/lib/Drupal/Core/Cron.php
Executes a cron run.

File

core/lib/Drupal/Core/Cron.php, line 194
Contains \Drupal\Core\Cron.

Class

Cron
The Drupal core Cron service.

Namespace

Drupal\Core

Code

protected function invokeCronHandlers() {

  // Iterate through the modules calling their cron handlers (if any):
  foreach ($this->moduleHandler
    ->getImplementations('cron') as $module) {

    // Do not let an exception thrown by one module disturb another.
    try {
      $this->moduleHandler
        ->invoke($module, 'cron');
    } catch (\Exception $e) {
      watchdog_exception('cron', $e);
    }
  }
}