Tagging module PLCWWW - PLCWWW-onelab.4.2-9
[plewww.git] / cron.php
1 <?php
2 // $Id: cron.php 144 2007-03-28 07:52:20Z thierry $
3
4 /**
5  * @file
6  * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
7  */
8
9 include_once './includes/bootstrap.inc';
10 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
11
12 // If not in 'safe mode', increase the maximum execution time:
13 if (!ini_get('safe_mode')) {
14   set_time_limit(240);
15 }
16
17 // Check if the last cron run completed
18 if (variable_get('cron_busy', false)) {
19   watchdog('cron', t('Last cron run did not complete.'), WATCHDOG_WARNING);
20 }
21 else {
22   variable_set('cron_busy', true);
23 }
24
25 // Iterate through the modules calling their cron handlers (if any):
26 module_invoke_all('cron');
27
28 // Clean up
29 variable_set('cron_busy', false);
30 variable_set('cron_last', time());
31 watchdog('cron', t('Cron run completed'));