Forums

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

Jira Automation Rule Scheduled Run Date

Drew Nedderman
Contributor
February 24, 2023

I have an automation rule to create a ticket on the 10th and 25th of each month. This works without issue.

If the 10th or the 25th of the month falls on a Saturday or Sunday, I need the rule to fire on the preceding Friday and then not fire on the actual date. Is there a way to do this?

1 answer

0 votes
Tobias H
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.
February 27, 2023

Hi Drew!

I assume that you currently using a CRON Expression that looks something like this: 
0 0 0 10,25 * ? *

What you could do is copy the automation and split it into two separate, with one triggering on the 10th and another on 25th.

And if you then use a W* after the date, like 0 0 0 10W * ? *, it will trigger at XY am, on the nearest weekday to the 10th of the month, every month

And have the second one set to 0 0 0 25W * ? *

Swap out the time for what you currently have and you will make sure for it to go off at the closest Weekday.

(I know you asked for it to trigger on the Friday before the weekend, but I am not sure that is possible with Cron expressions)

  • *W (“weekday”) - used to specify the weekday (Monday-Friday) nearest the given day. As an example, if you were to specify “10W” as the value for the day-of-month field, the meaning is: “the nearest weekday to the 10th of the month”. So if the 10th is a Saturday, the trigger will fire on Friday the 9th. If the 10th is a Sunday, the trigger will fire on Monday the 11th. If the 10th is a Tuesday, then it will fire on Tuesday the 10th.

    • However if you specify “1W” as the value for day-of-month, and the 1st is a Saturday, the trigger will fire on Monday the 3rd, as it will not ‘jump’ over the boundary of a month’s days. The ‘W’ character can only be specified when the day-of-month is a single day, not a range or list of days.

 

Hope this helps somewhat at least :)

Suggest an answer

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

Atlassian Community Events