I have created a crontab in my custom module and scheduled at every 10 minutes. It is working fine, when I am running the "php bin/magento setup:upgrade" command.
So, first time it is working fine, in cron_schedule table, status = success and message = null. which is fine. but, after 10 minutes this cron is not working.
Having status = error and message = "No callbacks found". I have debugged the code and found that in second time cron "instance" is not being set.
Can anyone help me on this? Why there is no instance in second time?
Here is my crontab.xml code:
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd"> <group id="index"> <job name="cron_setup_job" instance="Vendor\Module\Cron\ClassName" method="execute"> <schedule>*/10 * * * *</schedule> </job> </group> </config>