You are here

public function JobController::discoverJobs in Ultimate Cron 8.2

Discovers new default cron jobs.

1 string reference to 'JobController::discoverJobs'
ultimate_cron.routing.yml in ./ultimate_cron.routing.yml
ultimate_cron.routing.yml

File

src/Controller/JobController.php, line 36

Class

JobController
A controller to interact with CronJob entities.

Namespace

Drupal\ultimate_cron\Controller

Code

public function discoverJobs() {
  \Drupal::service('ultimate_cron.discovery')
    ->discoverCronJobs();
  $this
    ->messenger()
    ->addStatus($this
    ->t('Completed discovery for new cron jobs.'));
  return $this
    ->redirect('entity.ultimate_cron_job.collection');
}