AOE Scheduler: Invalid model / method definition

From XTENTO Support Wiki
Jump to: navigation, search

If you get an error message similar to:

Invalid model/method definition, expecting "model/class::method", got "" instead.

This is probably happening because you have AOE Scheduler installed. If all cronjobs are working fine, you can ignore this message. If you want to get rid of the message, simply remove AOE Scheduler and see if cronjobs work as expected. We are unsure whether this is a bug in AOE Scheduler or something happening outside of our modules.

As of 2017 it seems that there are third party modules that, when run in the same cron execution with our module, so at the same minute, and who call the Magento app clearCache() method, cause the issue. One extension which does this for example is the Ebizmarts Mailchimp extension, and they are trying to work on a fix: https://github.com/mailchimp/mc-magento/issues/501#issuecomment-335159272 - Check your code base for clearCache() and if you have modules doing this in a method used during cron execution, that probably causes it.

A possible solution can be to schedule our cronjobs to run at times when other cronjobs don't run. Let's say your cronjob always fails at 8:00am. Schedule it for 7:53am for example to make sure it doesn't run with other jobs, and it could work.

If that doesn't help, you can contact us and ask for the so called "manual cron method", where we will provide you with specific PHP files that must be placed in specific directories, and you can then set up cron jobs directly in the crontab that are only responsible of handling our import/export cronjobs, to avoid issues with the Magento cron scheduler/AOE Scheduler.

This error is nothing we can fix unfortunately. There are just workarounds. The best solution to fix this issue entirely is described below.

A working solution when using cache-resetting modules (such as Mailchimp) in Magento 1

If you need to use Mailchimp or other modules that reset the cache during runtime, the only solution is to install AOE Scheduler and move our cronjobs into a separate cron group: https://github.com/AOEpeople/Aoe_Scheduler/blob/master/doc/cron-groups.md

Steps:

* * * * * /bin/bash /var/www/magento/current/htdocs/scheduler_cron.sh --mode always --includeGroups xtento
* * * * * /bin/bash /var/www/magento/current/htdocs/scheduler_cron.sh --mode always --excludeGroups xtento
* * * * * /bin/bash /var/www/magento/current/htdocs/scheduler_cron.sh --mode default --includeGroups xtento
* * * * * /bin/bash /var/www/magento/current/htdocs/scheduler_cron.sh --mode default --excludeGroups xtento
You can find examples at System > Scheduler > Instructions. Of course, you must adjust the path to the Magento root directory.

This will make sure our cronjobs are executed in a completely separate cron group.

Personal tools
Namespaces
Variants
Actions
General Information
Magento 2 Guides
Magento 2 Extensions
Magento 1 Guides
Magento 1 Extensions
Magento Integration Suite
Product Feed Guides
Toolbox