You are here

function drush_scheduler_cron in Scheduler 7

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

Run lighweight scheduler cron.

File

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

Code

function drush_scheduler_cron() {

  // Load the cron functions file then run scheduler cron.
  module_load_include('inc', 'scheduler', 'scheduler.cron');

  // Running the lightweight cron function _scheduler_run_cron() gives the dblog
  // rows but also kills drush. If we wanted to use that function, we can check
  // function_exists('drush_main') to do conditional code.
  scheduler_cron();
  $nomsg = drush_get_option('nomsg', NULL);
  $nomsg ? NULL : drupal_set_message(t('Scheduler lightweight cron completed.'));
}