diff --git a/cron.php b/cron.php index 6b22941f5ac3aeef4aebc9061bcd2e4d211689bb..1d93ff5c7fcbca8fe0383e00c66fb2be81010967 100644 --- a/cron.php +++ b/cron.php @@ -1,22 +1,25 @@ <?php -// $Id$ - include_once "includes/bootstrap.inc"; include_once "includes/common.inc"; -/* -** If not in 'safe mode', increase the maximum execution time: -*/ - +// If not in 'safe mode', increase the maximum execution time: if (!ini_get("safe_mode")) { set_time_limit(240); } -/* -** Iterate through the modules calling their cron handlers (if any): -*/ +// Check if the last cron run completed +if (variable_get('cron_busy', false)) { + watchdog('warning', t('Last cron run did not complete.')); +} +else { + variable_set('cron_busy', true); +} + +// Iterate through the modules calling their cron handlers (if any): +module_invoke_all('cron'); -module_invoke_all("cron"); +// Clean up +variable_set('cron_busy', false); +watchdog('regular', t('Cron run completed')); -watchdog('regular', t('cron run completed')); ?>