summaryrefslogtreecommitdiff
path: root/cron.php
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-08-07 20:59:45 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-08-07 20:59:45 +0000
commitc3737f51ee7004c4d8db1e82813ddc894b23272f (patch)
tree0f97f36a750d61e99c843d89acfa525fb1fd9e11 /cron.php
parentddb31aaf6b193861eddb25c938c733f3f2093d3f (diff)
downloadbrdo-c3737f51ee7004c4d8db1e82813ddc894b23272f.tar.gz
brdo-c3737f51ee7004c4d8db1e82813ddc894b23272f.tar.bz2
Cron.php
- #1322: Adding a warning if the cron fails to complete. - Simplifying odd commenting syntax
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php25
1 files changed, 14 insertions, 11 deletions
diff --git a/cron.php b/cron.php
index 6b22941f5..1d93ff5c7 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'));
?>