0
votes

I need to create a CRON job to run on LAST week of the month and then the day of the week and time.

I got the fourth week to work, that is expression for it: fourth week, Sunday, 12:00

0 0 12 ? 1/1 SUN#4 *

What I need is: last week, Friday, 12:00

I tried 0 0 3 L * ? but that will run on last day of the month.

enter image description here

CroneMakerHelper

2

2 Answers

0
votes

You can choose the friday and use condition to check if it is last friday, like below

0 0 * * 5 root run-if-today L

0
votes

After some trial and error here is a solution for CRON job to run on the every last week of the month

0 00 12 ? * 6L

This expressions means: run every last week of the month, Friday, 12:00