/[drupal]/drupal/cron.php
ViewVC logotype

Contents of /drupal/cron.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.43 - (show annotations) (download) (as text)
Mon Nov 2 03:30:49 2009 UTC (3 weeks, 5 days ago) by webchick
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, HEAD
Changes since 1.42: +10 -5 lines
File MIME type: text/x-php
#565154 by klausi and matason: Only run cron.php when site not in maintenance mode.
1 <?php
2 // $Id: cron.php,v 1.42 2009/02/08 20:27:51 webchick Exp $
3
4 /**
5 * @file
6 * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
7 */
8
9 /**
10 * Root directory of Drupal installation.
11 */
12 define('DRUPAL_ROOT', getcwd());
13
14 include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
15 drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
16
17 if (!isset($_GET['cron_key']) || variable_get('cron_key', 'drupal') != $_GET['cron_key']) {
18 watchdog('cron', 'Cron could not run because an invalid key was used.', array(), WATCHDOG_NOTICE);
19 drupal_access_denied();
20 }
21 elseif (variable_get('maintenance_mode', 0)) {
22 watchdog('cron', 'Cron could not run because the site is in maintenance mode.', array(), WATCHDOG_NOTICE);
23 drupal_access_denied();
24 }
25 else {
26 drupal_cron_run();
27 }

  ViewVC Help
Powered by ViewVC 1.1.2