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

4 5
/**
 * @file
6
 * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
7 8
 */

9 10 11 12 13 14
/**
 * Root directory of Drupal installation.
 */
define('DRUPAL_ROOT', dirname(realpath(__FILE__)));

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']) {
  drupal_cron_run();
18 19 20
}
else {
  watchdog('cron', 'Cron did not run because an invalid key used.', array(), WATCHDOG_NOTICE);
21
  drupal_access_denied();
22
}