function 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 2368
Code
function system_run_cron() {
if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], 'run-cron')) {
return MENU_ACCESS_DENIED;
}
// 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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.