문제

I'm using Magento version 2.2.5 and I've created a cron job for my custom module, but it's often missed, first I setup the cron to run every 5 minutes

<group id="default"> 
  <job instance="Custom\Module\Cron\SyncTransaction" method="execute" name="lime_sepulsa_synctransaction">
    <schedule>*/5 * * * *</schedule>
  </job>
</group>

enter image description here

then I tried to fix it by setting up the cron to run every minute, but still got the same result

<group id="default"> 
  <job instance="Custom\Module\Cron\SyncTransaction" method="execute" name="lime_sepulsa_synctransaction">
    <schedule>* * * * *</schedule>
  </job>
</group>

enter image description here

도움이 되었습니까?

해결책

You should change your cronjob group id from default to index if you want your cron to run every minute without being missed:

<group id="index"> 
  <job instance="Custom\Module\Cron\SyncTransaction" method="execute" name="lime_sepulsa_synctransaction">
    <schedule>* * * * *</schedule>
  </job>
</group>

by default cronjob group with id default will run every 15 minutes but index group will run every minute

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top