Thanks,
This is teh version of run.php I have - It looks exactly the same as the version from the main pckg download.
If you have any pointers of what to play with in the file, I'd appreciate it :)
.....
define('_OW_', true);
define('DS', DIRECTORY_SEPARATOR);
define('OW_DIR_ROOT', substr(dirname(__FILE__), 0, - strlen('ow_cron')));
define('OW_CRON', true);
require_once(OW_DIR_ROOT . 'ow_includes' . DS . 'init.php');
OW::getPluginManager()->initPlugins();
$event = new OW_Event(OW_EventManager::ON_PLUGINS_INIT);
OW::getEventManager()->trigger($event);
//init cache manager
$beckend = OW::getEventManager()->call('base.cache_backend_init');
if ( $beckend !== null )
{
OW::getCacheManager()->setCacheBackend($beckend);
OW::getCacheManager()->setLifetime(3600);
OW::getDbo()->setUseCashe(true);
}
OW::getThemeManager()->initDefaultTheme();
// setting current theme
$activeThemeName = OW::getConfig()->getValue('base', 'selectedTheme');
if ( $activeThemeName !== BOL_ThemeService::DEFAULT_THEME && OW::getThemeManager()->getThemeService()->themeExists($activeThemeName) )
{
OW_ThemeManager::getInstance()->setCurrentTheme(BOL_ThemeService::getInstance()->getThemeObjectByName(trim($activeThemeName)));
}
$plugins = BOL_PluginService::getInstance()->findActivePlugins();
foreach ( $plugins as $plugin )
{
/* @var $plugin BOL_Plugin */
$pluginRootDir = OW::getPluginManager()->getPlugin($plugin->getKey())->getRootDir();
if ( file_exists($pluginRootDir . DS . 'cron.php') )
{
include $pluginRootDir . DS . 'cron.php';
$className = strtoupper($plugin->getKey()) . '_Cron';
$cron = new $className;
$runJobs = array();
$newRunJobDtos = array();
foreach ( BOL_CronService::getInstance()->findJobList() as $runJob )
{
/* @var $runJob BOL_CronJob */
$runJobs[$runJob->methodName] = $runJob->runStamp;
}
$jobs = $cron->getJobList();
foreach ( $jobs as $job => $interval )
{
$methodName = $className . '::' . $job;
$runStamp = ( isset($runJobs[$methodName]) ) ? $runJobs[$methodName] : 0;
$currentStamp = time();
if ( ( $currentStamp - $runStamp ) > ( $interval * 60 ) )
{
$runJobDto = new BOL_CronJob();
$runJobDto->methodName = $methodName;
$runJobDto->runStamp = $currentStamp;
$newRunJobDtos[] = $runJobDto;
BOL_CronService::getInstance()->batchSave($newRunJobDtos);
$newRunJobDtos = array();
$cron->$job();
}
}
}
}