function CronController::run

Same name and namespace in other branches
  1. 9 core/modules/system/src/CronController.php \Drupal\system\CronController::run()
  2. 8.9.x core/modules/system/src/CronController.php \Drupal\system\CronController::run()
  3. 10 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 37

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.