cron.php 590 Bytes
Newer Older
Dries's avatar
 
Dries committed
1
<?php
Steven Wittens's avatar
Steven Wittens committed
2 3
// $Id$

Dries's avatar
 
Dries committed
4
include_once "includes/bootstrap.inc";
5
include_once "includes/common.inc";
Dries's avatar
 
Dries committed
6

Steven Wittens's avatar
Steven Wittens committed
7
// If not in 'safe mode', increase the maximum execution time:
8
if (!ini_get("safe_mode")) {
Dries's avatar
 
Dries committed
9
  set_time_limit(240);
Dries's avatar
 
Dries committed
10 11
}

Steven Wittens's avatar
Steven Wittens committed
12 13 14 15 16 17 18 19 20 21
// 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');
Dries's avatar
 
Dries committed
22

Steven Wittens's avatar
Steven Wittens committed
23 24 25
// Clean up
variable_set('cron_busy', false);
watchdog('regular', t('Cron run completed'));
Dries's avatar
 
Dries committed
26

Dries's avatar
 
Dries committed
27
?>