Magento 2 Cron Job Error – No Callbacks Found

croncrontabmagento2magento2.2.3

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?

Thank you.

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>

Best Answer

Finally, My cron job is working fine. I don't know what was the issue with my crontab.xml and cron class file. But, I have deleted my files and copied and pasted core module's files in my module and renamed them. This time I have changed job name, and it is working fine for me. Now, I don't have "No callbacks found" error anymore. If anyone has such error/issue, advice to use core module's crontab.xml file in your module and do needful changes. It will work fine. Most Important: Need to set <group id="default"> Thanks.

Related Topic