Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

[WTA] The meaning of this
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

try {
    Mage
::getConfig()->init()->loadEventObservers('crontab');
    
Mage::app()->addEventArea('crontab');
    
Mage::dispatchEvent('default');
catch (Exception $e{
    Mage
::printException($e);
}

what is this code means ? and Can I know its return values ?

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
alkarim
Guru
 
Total Posts:  368
Joined:  2008-04-10
 

one more question…

I’m going to make cron job at magento… but when code using Mage::getBlockSingleton(), I got FATAL ERROR

this is my code :

<?php
class Fend_Feed_Model_Observer
{
    
public function dailyFeedUpdate()
    
{
    $activeFeed 
Mage::getBlockSingleton('feed/list');
    
Mage::getBlockSingleton('feed/feed')->getFeed($activeFeed);
    
}
}

?>

and I got this :
Fatal error: Call to a member function getActiveFeed() on a non-object in /home/alkarim/vm/app/code/local/Fend/Feed/Model/Observer.php on line 7

does anybody got the same problem ??

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top