2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2004-08-07 21:00:43 +00:00
|
|
|
// $Id$
|
|
|
|
|
2004-08-21 06:42:38 +00:00
|
|
|
/**
|
|
|
|
* @file
|
2004-09-09 05:51:08 +00:00
|
|
|
* Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
|
2004-08-21 06:42:38 +00:00
|
|
|
*/
|
|
|
|
|
2008-09-20 20:22:25 +00:00
|
|
|
/**
|
|
|
|
* Root directory of Drupal installation.
|
|
|
|
*/
|
2009-02-08 20:27:51 +00:00
|
|
|
define('DRUPAL_ROOT', getcwd());
|
2008-09-20 20:22:25 +00:00
|
|
|
|
|
|
|
include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
|
2005-07-23 05:57:27 +00:00
|
|
|
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
|
2009-11-02 03:30:49 +00:00
|
|
|
|
|
|
|
if (!isset($_GET['cron_key']) || variable_get('cron_key', 'drupal') != $_GET['cron_key']) {
|
2009-01-26 14:11:34 +00:00
|
|
|
watchdog('cron', 'Cron could not run because an invalid key was used.', array(), WATCHDOG_NOTICE);
|
2008-05-26 17:24:42 +00:00
|
|
|
drupal_access_denied();
|
2008-05-09 19:23:48 +00:00
|
|
|
}
|
2009-11-02 03:30:49 +00:00
|
|
|
elseif (variable_get('maintenance_mode', 0)) {
|
|
|
|
watchdog('cron', 'Cron could not run because the site is in maintenance mode.', array(), WATCHDOG_NOTICE);
|
|
|
|
drupal_access_denied();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
drupal_cron_run();
|
|
|
|
}
|