We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Notifications Cron | Forum

matt
matt Jan 30 '13
Hiya,

I noticed that after the update to 1.5.1, users were staying logged in, until I manually ran /ow_cron/run.php

Strange!

Anyone else getting this problem? 

Matt
Alia Team
Alia Jan 31 '13
Matt,  this could have happened only if during the update you have changed your domain name.

matt
matt Jan 31 '13
Hi Aliia,

I really cant imagine what you mean. Do you mean that when the update msg arrived in admin, and I clicked to update, mid process I then decide to move my entire site to a different host?

I simply updated, via the admin panel. Nothing more.

Kind regards,

Matt
OW Developer
OW Developer Jan 31 '13
lol alot of ppl are having the same problem matt, i agree something is not right with the 1.5.1 update with the corn job... i have had to do the same thing for like 20 ppl so far.
matt
matt Jan 31 '13
May I ask what you did to fix it?

I Appreciate your time,

Thanks,

Matt
OW Developer
OW Developer Jan 31 '13
few different things making shore the corn is correct also manually  up dating the corn.php file thats been working for me but sometime it give me issues still.
matt
matt Jan 31 '13
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();
            }
        }
    }
}