| Commit | Line | Data |
|---|---|---|
| accd5f0c | 1 | <?php |
| 1e1144f1 | 2 | |
| 94e30bf7 DB |
3 | /** |
| 4 | * @file | |
| b84b6e42 | 5 | * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs). |
| 94e30bf7 DB |
6 | */ |
| 7 | ||
| a3bb66e4 AB |
8 | /** |
| 9 | * Root directory of Drupal installation. | |
| 10 | */ | |
| d802c69a | 11 | define('DRUPAL_ROOT', getcwd()); |
| a3bb66e4 AB |
12 | |
| 13 | include_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
| ba166016 | 14 | drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); |
| ad0ce48e AB |
15 | |
| 16 | if (!isset($_GET['cron_key']) || variable_get('cron_key', 'drupal') != $_GET['cron_key']) { | |
| ba5609c1 | 17 | watchdog('cron', 'Cron could not run because an invalid key was used.', array(), WATCHDOG_NOTICE); |
| fe7761fc | 18 | drupal_access_denied(); |
| 37a36275 | 19 | } |
| ad0ce48e AB |
20 | elseif (variable_get('maintenance_mode', 0)) { |
| 21 | watchdog('cron', 'Cron could not run because the site is in maintenance mode.', array(), WATCHDOG_NOTICE); | |
| 22 | drupal_access_denied(); | |
| 23 | } | |
| 24 | else { | |
| 25 | drupal_cron_run(); | |
| 26 | } |