protected function Cron::setCronLastTime in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Cron.php \Drupal\Core\Cron::setCronLastTime()
- 9 core/lib/Drupal/Core/Cron.php \Drupal\Core\Cron::setCronLastTime()
Records and logs the request time for this cron invocation.
File
- core/lib/ Drupal/ Core/ Cron.php, line 158 
Class
- Cron
- The Drupal core Cron service.
Namespace
Drupal\CoreCode
protected function setCronLastTime() {
  // Record cron time.
  $request_time = $this->time
    ->getRequestTime();
  $this->state
    ->set('system.cron_last', $request_time);
  $this->logger
    ->info('Cron run completed.');
}