Forums

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

Recurring card scheduled for 3 days before the first friday of the month

Camilla Braganca
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!
July 25, 2024

Hi everyone!

 

I need to create a recurring card scheduled for 3 days before the first friday of the month. I tried the basic session on the automation, but it doesn't solve my problem.

How can I build a JQL that would solve this problem?

2 answers

0 votes
Trudy Claspill
Community Champion
July 25, 2024

Hello @Camilla Braganca 

Do you mean you want to set the Due Date on that issue to be 3 days before the first Friday of the month?

How far in advance of that date do you want this card created?

Let's say you want the recurring task created 2 weeks before it is due. And if it will be due 3 days before a Friday that means it will be due on a Tuesday. So, create a rule that runs every Tuesday.

In that rule you could add a condition to check if day on which it runs is 2 weeks + 3 days before the first Friday of a month. If it is, then you want to create the recurring task.

To determine if that date 17 days from the Tuesday is the first Friday of the month, check that its day-of-month value is less than 8. (The first Friday could have dates 1 through 7, with the date being 7 if the first day of the month was the previous Saturday.)

Screenshot 2024-07-25 at 2.40.55 PM.png

If that condition passes, then it is the right time (2 weeks in advance) to create the new task.

Set the Due date for the task being created to 14 days from the date the rule is running.

Screenshot 2024-07-25 at 2.42.19 PM.png

 

Lets run through some examples, using this month (July).

If the rule ran on Tuesday the 2nd, 17 days from then would be Friday then 19th. 19 is not less than 8, so that Friday is not the first Friday in the upcoming month.

If the rule ran on Tuesday the 9th, 17 days from then would be Friday then 26th. 26 is not less than 8, so that Friday is not the first Friday in the upcoming month.

If the rule ran on Tuesday the 16th, 17 days from then would be Friday then 2nd. 2 is less than 8, so that Friday is the first Friday in the upcoming month.

  • Create the task. Set the due date to today (16th) plus 14 days, making the Due date July 30th. That is three days before the first Friday of August, which is August 2nd.

 

You can keep running through examples to prove to yourself that the recurring task would be created correctly, 2 weeks in advance of the first Friday of the month.

 

Trudy Claspill
Community Champion
August 4, 2024

Hello @Camilla Braganca 

Were you able to solve your requirement with the guidance I provided?

Do you have additional questions?

0 votes
Fernando Eugênio da Silva
Community Champion
July 25, 2024

@Camilla Braganca , Welcome to the Atlassian Community!

I believe that what you actually need is to use a CRON expression in your Scheduled trigger automation.

In Scheduled you can use advanced CRON expressions to get closer to the scheduled execution you expect.

This cron expression for example will run every first Friday of each month at 12:00 PM: 0 0 12 ? 1/1 FRI#1 *

If you are not confortable with cron expressions you can use a Cron Maker site to help you, like this one: http://www.cronmaker.com/?1

 

Hope this helps you :)

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events