mangento 2 Cron Job is not scheduled with fix time
-
01-03-2021 - |
Domanda
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!
Soluzione
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.
Altri suggerimenti
is that cron running on the server?
try with * * * * * and check is that entry doing everry min
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange