2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2004-08-07 21:00:43 +00:00
|
|
|
// $Id$
|
|
|
|
|
2004-08-21 06:42:38 +00:00
|
|
|
/**
|
|
|
|
* @file
|
2004-09-09 05:51:08 +00:00
|
|
|
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
|
2004-08-21 06:42:38 +00:00
|
|
|
*/
|
|
|
|
|
2005-09-08 19:19:01 +00:00
|
|
|
include_once './includes/bootstrap.inc';
|
2005-07-23 05:57:27 +00:00
|
|
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
2000-12-23 15:13:34 +00:00
|
|
|
|
2004-08-07 20:59:45 +00:00
|
|
|
// If not in 'safe mode', increase the maximum execution time:
|
2004-08-12 18:00:11 +00:00
|
|
|
if (!ini_get('safe_mode')) {
|
2003-04-21 12:23:16 +00:00
|
|
|
set_time_limit(240);
|
2001-07-16 14:43:56 +00:00
|
|
|
}
|
|
|
|
|
2004-08-07 20:59:45 +00:00
|
|
|
// Check if the last cron run completed
|
|
|
|
if (variable_get('cron_busy', false)) {
|
2005-01-09 09:22:40 +00:00
|
|
|
watchdog('cron', t('Last cron run did not complete.'), WATCHDOG_WARNING);
|
2004-08-07 20:59:45 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
variable_set('cron_busy', true);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Iterate through the modules calling their cron handlers (if any):
|
|
|
|
module_invoke_all('cron');
|
2001-07-16 14:43:56 +00:00
|
|
|
|
2004-08-07 20:59:45 +00:00
|
|
|
// Clean up
|
|
|
|
variable_set('cron_busy', false);
|
2004-11-28 12:28:35 +00:00
|
|
|
watchdog('cron', t('Cron run completed'));
|
2001-11-01 11:00:51 +00:00
|
|
|
|