You are here

function system_run_cron in Drupal 7

Same name and namespace in other branches
  1. 5 modules/system/system.module \system_run_cron()
  2. 6 modules/system/system.admin.inc \system_run_cron()

Menu callback: run cron manually.

1 string reference to 'system_run_cron'
system_menu in modules/system/system.module
Implements hook_menu().

File

modules/system/system.admin.inc, line 2360
Admin page callbacks for the system module.

Code

function system_run_cron() {

  // Run cron manually
  if (drupal_cron_run()) {
    drupal_set_message(t('Cron ran successfully.'));
  }
  else {
    drupal_set_message(t('Cron run failed.'), 'error');
  }
  drupal_goto('admin/reports/status');
}