cron.php

  1. drupal
    1. 4.6 cron.php
    2. 4.7 cron.php
    3. 5 cron.php
    4. 6 cron.php
    5. 7 cron.php

Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).

File

cron.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Handles incoming requests to fire off regularly-scheduled tasks (cron jobs).
  5. */
  6. include_once './includes/bootstrap.inc';
  7. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  8. // If not in 'safe mode', increase the maximum execution time:
  9. if (!ini_get('safe_mode')) {
  10. set_time_limit(240);
  11. }
  12. // Check if the last cron run completed
  13. if (variable_get('cron_busy', false)) {
  14. watchdog('cron', t('Last cron run did not complete.'), WATCHDOG_WARNING);
  15. }
  16. else {
  17. variable_set('cron_busy', true);
  18. }
  19. // Iterate through the modules calling their cron handlers (if any):
  20. module_invoke_all('cron');
  21. // Clean up
  22. variable_set('cron_busy', false);
  23. variable_set('cron_last', time());
  24. watchdog('cron', t('Cron run completed'));
Login or register to post comments