Index: branches/5.2.x/tools/cron.php =================================================================== diff -u -N -r14879 -r15033 --- branches/5.2.x/tools/cron.php (.../cron.php) (revision 14879) +++ branches/5.2.x/tools/cron.php (.../cron.php) (revision 15033) @@ -1,6 +1,6 @@ /tools/cron.php -O /dev/null > /dev/null 2>&1 - // */10 * * * * /usr/bin/php /path/to/site/tools/cron.php +// Use either of lines above to invoke from cron: +// */10 * * * * wget http:///tools/cron.php -O /dev/null > /dev/null 2>&1 +// */10 * * * * /usr/bin/php /path/to/site/tools/cron.php - $start = microtime(true); +$start = microtime(true); - define('CRON', 1); - define('ADMIN', 1); - define('FULL_PATH', realpath(dirname(__FILE__) . '/..')); - define('CMD_MODE', isset($argv) && count($argv) ? 1 : 0); +define('CRON', 1); +define('ADMIN', 1); +define('FULL_PATH', realpath(dirname(__FILE__) . '/..')); +define('CMD_MODE', isset($argv) && count($argv) ? 1 : 0); - if (CMD_MODE) { - define('DBG_SKIP_REPORTING', 1); - $_SERVER['REQUEST_URI'] = 'CRON'; - $_SERVER['HTTP_USER_AGENT'] = 'gecko'; - } +if ( CMD_MODE ) { + define('DBG_SKIP_REPORTING', 1); + $_SERVER['REQUEST_URI'] = 'CRON'; + $_SERVER['HTTP_USER_AGENT'] = 'gecko'; +} - include_once(FULL_PATH . '/core/kernel/startup.php'); +include_once(FULL_PATH . '/core/kernel/startup.php'); - $application =& kApplication::Instance(); - $application->Init(); +$application =& kApplication::Instance(); +$application->Init(); - // events from request are not processed, only predefined regular events - $application->EventManager->runScheduledTasks(reBEFORE, true); - $application->EventManager->runScheduledTasks(reAFTER, true); +// events from request are not processed, only predefined scheduled tasks +$application->EventManager->runScheduledTasks(true); - $application->Done(); +$application->Done(); - $end = microtime(true); \ No newline at end of file +$end = microtime(true); \ No newline at end of file