0

i'm trying to create dynamic cronjob based on my configuration value. already created group defined in cron_groups.xml

and defined cron task

<group id="mycompany">
    <job instance="Vendor\Module\Cron\Task" method="execute" name="custom_task">
        <config_path>tab/group/field</config_path>
    </job>
</group>

Most strange thing is if i use * * * * * as input value in admin config then i do see my task in cronjob table.

but when i set specific time like 0 0 * * * i don't see it there.

any idea what is wrong ?

1 Answer 1

0

Magento uses a five value specification for a cron job. The numbers per each * * * * * is as follows:

Minute (0-59) For all Start environments and Pro Integration environments, the minimum frequency supported for crons is five minutes. You may need to configure settings in your Magento Admin.

Hour (0-23)

Day of month (1 - 31)

Month (1 - 12)

Day of week (0 - 6) (Sunday to Saturday; 7 is also Sunday on some systems)

  * * * * * command to be executed
  | | | | |
  | | | | +----- Day of week (0 - 7) (Sunday=0 or 7)
  | | | +------- Month (1 - 12)
  | | +--------- Day of month (1 - 31)
  | +----------- Hour (0 - 23)
  +------------- Minute (0 - 59)
1
  • wel it seem to be time problem. there is 2 hours difference between time i set and the time it was executed.. Apr 11, 2019 at 11:01

Your Answer

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

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