I have created a custom cron group and below is the code.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
    <group id="MyCronJob">

In the cron group, I'm having 6 job instances and I want to generate the CRON for every 4 hours. so, I have updated the job instance as below

<job name="test_cron" instance="vendor\module\Cron\test" method="execute">
            <schedule>0 */4 * * *</schedule>

Now my question is, in the CRON group, there is schedule_generate_every, so do I need to update the time in that portion as well and what is the difference which we are giving time in crontab and in crongroups.

Please guide and help.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.