One of my client's CRON daemon recently started sending those errors:
PHP Fatal error: Call to a member function addFieldToFilter() on a non-object in /app/code/core/Mage/Cron/Model/Observer.php on line 105
Running Magento 1.8.1.0
This corresponds to the following lines:
$this->_pendingSchedules = Mage::getModel('cron/schedule')->getCollection()
->addFieldToFilter('status', Mage_Cron_Model_Schedule::STATUS_PENDING)
->load();
I've already ensured that the Mage_Cron_Model_Resource_Schedule_Collection
class exists and the file is at the right location.
I've also checked the cron_schedule
table and cron is running fine, most of the scheduled job are in the success
status and there's a few pending
jobs as well.
I'm not quite sure where I should start debugging. Any clue where I should start looking to narrow down the issue ?
Cron/Model/Resource/Schedule
folder. Otherwise, it's hard to tell what could exactly cause this without more context. But check when the cron last ran properly, something changed at that time – Mayers Jun 14 '16 at 15:56