summaryrefslogtreecommitdiffstats
path: root/cron.php
blob: 98026de151058356cb0c29edf2b302ee8c68d203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
// $Id$

/**
 * @file
 * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
 */

include_once 'includes/bootstrap.inc';
include_once 'includes/common.inc' ;

// If not in 'safe mode', increase the maximum execution time:
if (!ini_get('safe_mode')) {
  set_time_limit(240);
}

// Check if the last cron run completed
if (variable_get('cron_busy', false)) {
  watchdog('cron', t('Last cron run did not complete.'), WATCHDOG_WARNING);
}
else {
  variable_set('cron_busy', true);
}

// Iterate through the modules calling their cron handlers (if any):
module_invoke_all('cron');

// Clean up
variable_set('cron_busy', false);
watchdog('cron', t('Cron run completed'));

?>