I'm trying to set up a cron job to run on last Sunday of each month at 4:00PM.
I came up with this:
https://crontab.guru/#00_16_/25,/26,/27,/28,/29,/30,/31__7
00 16 */25,*/26,*/27,*/28,*/29,*/30,*/31 * 7
I've put this into crontab.xml (which was running before with */1 * * * *)
<group id="default">
<job instance="Company\DeleteOldProducts\Cron\DeleteOldProducts" method="execute" name="delete_old_products">
<schedule>00 16 */25,*/26,*/27,*/28,*/29,*/30,*/31 * 7</schedule>
</job>
</group>
This, for some reason does not generate the cron tasks.
Does Magento 2 accept this comma separated notation?
I've looked around and don't see any errors in exception.log or system.log or debug.log.
Any ideas?
CodePudding user response:
Woops, I just had to wait a bit longer. Looks like it accepted the job.
cron job created - used a current date for testing that's why its May 6