function drush_core_cron

8.0.x core.drush.inc drush_core_cron()
6.x core.drush.inc drush_core_cron()
7.x core.drush.inc drush_core_cron()
3.x core.drush.inc drush_core_cron()
4.x core.drush.inc drush_core_cron()
5.x core.drush.inc drush_core_cron()
master core.drush.inc drush_core_cron()

Command callback. Runs cron hooks.

This is where the action takes place.

In this function, all of Drupals API is (usually) available, including any functions you have added in your own modules/themes.

To print something to the terminal window, use drush_print().

File

commands/core/core.drush.inc, line 512
Core drush commands.

Code

function drush_core_cron() {
  if (drupal_cron_run()) {
    drush_log(dt('Cron run successfully.'), 'success');
  }
  else {
    return drush_set_error('DRUSH_CRON_FAILED', dt('Cron run failed.'));
  }
}