To solve this issue, edit Cron.php (in the root installation directory).
try {
Mage::getConfig()->init()->loadEventObservers(’crontab’);
Mage::app()->addEventArea(’crontab’);
Mage::dispatchEvent(’default’);
$observ = Mage::getModel(’catalogrule/observer’);
$observ->dailyCatalogUpdate("0 1 * * *");
try {
Mage::getConfig()->init()->loadEventObservers(’crontab’);
Mage::app()->addEventArea(’crontab’);
Mage::dispatchEvent(’default’);
$observ = Mage::getModel(’catalogrule/observer’);
$observ->dailyCatalogUpdate("0 1 * * *");
The code is missing a couple of lines. The whole code is:
ReplyDeletetry {
Mage::getConfig()->init()->loadEventObservers('crontab');
Mage::app()->addEventArea('crontab');
Mage::dispatchEvent('default');
$observ = Mage::getModel('catalogrule/observer');
$observ->dailyCatalogUpdate("0 1 * * *");
} catch (Exception $e) {
Mage::printException($e);
}
work like a charm, thank you so much
ReplyDeleteTHis is so helpful! Got it finally working! THANK YOU !!!
ReplyDeleteThanks a lot work like charm (life saving code)
ReplyDeleteWhether i have to give the first code or vassilis code ? Which code is perfect ?
ReplyDeletethanks!