cron.php

  1. 7.x cron.php
  2. 6.x cron.php
  3. 4.x cron.php
  4. 5.x cron.php

The cron.php file for FlightPath, which should be run periodically.

This file will invoke hook_cron on all available modules. It should be accessed in a similar method as wget http://url/cron.php?t=CRON_TOKEN

You can find your site's cron token (and change it if you wish) in your /custom/settings.php file.

File

cron.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * The cron.php file for FlightPath, which should be run periodically.
  5. *
  6. * This file will invoke hook_cron on all available modules. It should be
  7. * accessed in a similar method as
  8. * wget http://url/cron.php?t=CRON_TOKEN
  9. *
  10. * You can find your site's cron token (and change it if you wish)
  11. * in your /custom/settings.php file.
  12. */
  13. // Keep the script from timing out prematurely...
  14. set_time_limit(99999); // around 27 hours.
  15. require_once("bootstrap.inc");
  16. //$GLOBALS["fp_die_mysql_errors"] = TRUE;
  17. //menu_rebuild_cache();
  18. $token = @$_REQUEST["t"];
  19. if ($token != @$GLOBALS["fp_system_settings"]["cron_security_token"]) {
  20. die("Sorry, cron security token does not match. View this file's
  21. source code for instructions on setting up your site's cron.");
  22. }
  23. watchdog("cron", "Cron run started", array(), WATCHDOG_DEBUG);
  24. invoke_hook("cron");
  25. watchdog("cron", "Cron run completed", array(), WATCHDOG_DEBUG);
  26. // TODO: also run hook_clicron jobs, which need to be run from the command line.
  27. variable_set("cron_last_run", time());