Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Having a CRON job run on a specific week of the month

adnanabbasaa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 22, 2021

I am working on a variety of schedules that utilize cron jobs. I am trying to make something run on the third Tuesday of the month. From what I have researched I can

0 0 L * *

In order for me to run something on the third week the workaround I have is

0 0 21-27 * 2

Picking the Tuesday that lands somewhere in what should be the third week of the month.

My question is if this is the most accurate/efficient way to do this. Is there a way to use

0 00 12 ? * 2L

and then minus that by 7 days to find the third tuesday as it were?

This is a CRON on a Jira system so I can't run an additional script to test if it meets the criteria

1 answer

0 votes
Marco Brundel
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 22, 2021

Hi @adnanabbasaa ,

Where in Jira you want to use the Cron? In a scheduled automation rule?

And is 

0 0 0 ? * 3#3 *

an option?

(explained: At 00:00:00am, on the 3rd Thursday of the month, every month )

 

Regards, Marco

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events