Ran Jobs by schedule doesnt create a cron job in cron scheduler

233 views Asked by At

i am trying to create a cron job for my custom module but when I run bin/magento cron: run. It shows "Ran jobs by schedule" in the command line but nothing happens in cron_scheduler table.

My crontab.xml looks

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="custom_crongroup">
        <job instance="AO\MultiStore\Cron\Reminder" method="execute" name="ao_multistore_cron">
            <schedule>* * * * *</schedule>
        </job>
    </group>
</config>

My cron_groups.xml looks

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="custom_crongroup">
        <job instance="AO\MultiStore\Cron\Reminder" method="execute" name="ao_multistore_cron">
            <schedule>* * * * *</schedule>
        </job>
    </group>
</config>

I know I have created a new group id but have already tried luck with index and default. When I hit "crontab -l" it shows me all 3 paths necessary

*/22 * * * * /opt/cpanel/ea-php73/root/usr/bin/php /home1/bgjsjlmy/public_html/speedsports/update/cron.php >> /home1/bgjsjlmy/public_html/speedsports/var/log/update.cron.log
*/24 * * * * /opt/cpanel/ea-php73/root/usr/bin/php /home1/bgjsjlmy/public_html/speedsports/bin/magento setup:cron:run >> /home1/bgjsjlmy/public_html/speedsports/var/log/setup.cron.log
*/23 * * * * /opt/cpanel/ea-php73/root/usr/bin/php /home1/bgjsjlmy/public_html/speedsports/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /home1/bgjsjlmy/public_html/speedsports/var/log/magento.cron.log

Don't worry about the 23 and 24 I have also used with ***** but no luck. I don't know what am I doing wrong with this. Can someone please help?

0

There are 0 answers