Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (24 sloc) 687 Bytes
* The passcode is used to ensure only those authorized can run
* a cron job. Change the below value to something of your choice.
* When running the cron job from CLI, use this passcode as the first
* argument.
* Example: /usr/bin/php cron.php my-pass-code
define('PASSCODE', '');
* Dont allow cron to be run via the browser, it must be run from CLI
header('HTTP/1.1 403 Forbidden');
if(!isset($argv[1]) || !strlen(PASSCODE) || PASSCODE !== $argv[1])
exit("Missing or invalid pass code.\n");
define('CLI', true); // Put Caffeine into CLI mode
Jump to Line
Something went wrong with that request. Please try again.