You are here

public function CronController::run in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/src/CronController.php \Drupal\system\CronController::run()
  2. 9 core/modules/system/src/CronController.php \Drupal\system\CronController::run()

Run Cron once.

Return value

\Symfony\Component\HttpFoundation\Response A Symfony response object.

1 string reference to 'CronController::run'
system.routing.yml in core/modules/system/system.routing.yml
core/modules/system/system.routing.yml

File

core/modules/system/src/CronController.php, line 45

Class

CronController
Controller for Cron handling.

Namespace

Drupal\system

Code

public function run() {
  $this->cron
    ->run();

  // HTTP 204 is "No content", meaning "I did what you asked and we're done."
  return new Response('', 204);
}