1

I am working magento 2 extension development. i am now able to set cron config path. I have used following code but it is not working.

i have created crontab.xml and put following code into this xml but this is not working.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="test_cron" instance="MyCompany\Test\Cron\Test" method="execute">            
            <config_path>mycompany/test/cron_daily</config_path>            
        </job>        
    </group>
</config>

Please let me know how can i set cron config path value?

1

It is right code which I have described above for cron tab.

I think when cron is running it will insert our cron entry into cron table instantly but when we use<config_path>then it will not insert instantly so I have checked with set * * * * * value and it is working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.