cancel
Showing results for 
Search instead for 
Did you mean: 

Cron Job to run every last date of every month on Magento2.4.3

Cron Job to run every last date of every month on Magento2.4.3

Hello,

 

I want my cron job to run every last date of month.So I just want to know how should I do that on crontab.xml file as per Magento standard.

As some month end on 30 date and some have 31 date as end date also need to take care of February month where we have 28 or 29.

 

 

 

3 REPLIES 3

Re: Cron Job to run every last date of every month on Magento2.4.3

Lol you just used Chat GPT to generate that response Smiley Very Happy That cron wouldn't run on the last day of month, it would run on last 4 days of the month in months that have 31 days.

Founder at https://agency418.com

Re: Cron Job to run every last date of every month on Magento2.4.3

Hii,

 

You can schedule a cron job to run on the last day of each month using the following expression: 0 0 L * *. This expression breaks down as follows: "0" minutes, "0" hours, "L" as the day of the month (which stands for the last day), and "*" for any month and day of the week.

Best regard,
YourTexasBenefits

Re: Cron Job to run every last date of every month on Magento2.4.3

hi,

 

"L" is not supported.Do you have any other way to do so?