mangento 2 Cron Job is not scheduled with fix time
-
01-03-2021 - |
Question
I want to execute cron every day at 10.05 so i have define crontab.xml as below
<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="Vendor\Module\Cron\Test" method="execute">
<schedule>5 10 * * *</schedule>
</job>
</group>
</config>
and this "test_cron" not iserted in "cron_schedule" table.
Any help would be appreciated!
Solution
If you are specifying the exact hours or minutes, magento calculates them with the timezone you defined inside Store -> Configuration -> General -> Locale Option -> Timezone (Default Config) to make entry in cron_schedule table.
Do not consider it to be your systems's current time.
OTHER TIPS
is that cron running on the server?
try with * * * * * and check is that entry doing everry min
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange