Aoe_Scheduler
Aoe_Scheduler copied to clipboard
Removed/Renamed cron jobs lose run model but linger in database
We started seeing stack traces like this after a change:
Cron error while executing catalog_product_scheduler:
exception 'Mage_Core_Exception' with message 'Invalid model/method definition, expecting "model/class::method", got "" instead.' in /var/www/magento/app/Mage.php:596
Stack trace:
#0 /var/www/magento/app/code/community/Aoe/Scheduler/Helper/Data.php(295): Mage::throwException('Invalid model/m...')
#1 /var/www/magento/app/code/community/Aoe/Scheduler/Model/Job.php(143): Aoe_Scheduler_Helper_Data->getCallBack('')
#2 /var/www/magento/app/code/community/Aoe/Scheduler/Model/Schedule.php(189): Aoe_Scheduler_Model_Job->getCallback()
#3 /var/www/magento/app/code/community/Aoe/Scheduler/Model/Schedule.php(579): Aoe_Scheduler_Model_Schedule->runNow(true)
#4 /var/www/magento/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#5 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1338): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#6 /var/www/magento/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#7 /var/www/magento/app/Mage.php(449): Mage_Core_Model_App->dispatchEvent('default', Array)
#8 /var/www/magento/shell/scheduler.php(374): Mage::dispatchEvent('default', Array)
#9 /var/www/magento/shell/scheduler.php(37): Aoe_Scheduler_Shell_Scheduler->cronAction()
#10 /var/www/magento/shell/scheduler.php(400): Aoe_Scheduler_Shell_Scheduler->run()
#11 {main}
The change was that we removed some cron jobs from config.xml, as in:
<crontab>
<jobs>
- <catalog_product_scheduler>
- <schedule>
- <config_path>catalog/frontend/schedule_product</config_path>
- </schedule>
- <run>
- <model>storefrontscheduling/cron_product::runSchedule</model>
- </run>
- </catalog_product_scheduler>
</jobs>
</crontab>
When I looked into the scheduler in the admin, I saw the jobs stuck around, but without a run model:
![screen shot 2015-11-24 at 5 10 23 pm](https://cloud.githubusercontent.com/assets/1566303/11382158/515cf532-92ce-11e5-88bd-0f17e03694fe.png)
having the same issue here after updating a module.
Any advice where to remove the "zombie" scheduled task?
we have the same: remove complete schedule and re-create does not solve it. How did you solve it?
you can find it in: core_config_data path like %crontab/jobs% either delete it: but then it is not re-created when you start re-using the module or give it an impossible frequency
but the question is: how would we be able to remove it entirely? Becuase now AOE scheduler does not allow you to disable it ...