You are here

function drush_scheduler_cron in Scheduler 8

Same name and namespace in other branches
  1. 7 scheduler.drush.inc \drush_scheduler_cron()
  2. 2.x scheduler.drush.inc \drush_scheduler_cron()

Run lightweight scheduler cron.

File

./scheduler.drush.inc, line 30
Drush commands for Scheduler.

Code

function drush_scheduler_cron() {
  \Drupal::service('scheduler.manager')
    ->runLightweightCron();
  $nomsg = drush_get_option('nomsg', NULL);
  $nomsg ? NULL : \Drupal::messenger()
    ->addMessage(t('Scheduler lightweight cron completed'));
}