Forums

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

Schedule a ticket for every 15 and 30 of each month

Daniel Bermudez
Contributor
September 24, 2024

1.png2.pngHi, I would like to know how I can create an automation to generate a ticket on the 15th and 30th of each month. I tried doing it the conventional way, but I don't see the option to choose specific dates of the month, only time intervals like "every 15 days" or "every 2 weeks."

2 answers

0 votes
Evgenii
Community Champion
September 24, 2024

Hi, @Daniel Bermudez 

It's a tricky question. Not all months have 30 days. 

You can combine 2 ways. Cron schedule + IF/ELSE validator.

In the "Scheduled" trigger, select "CRON expression" and input the following:

0 9 15,28-31 * ? *

This will trigger at 09:00 on the 15th and from the 28th through the 31st of every month. However, we will add a condition to filter out only the last day of the month for those days from 28 to 31.

Add a Condition to Handle the Last Day of the Month:

After the scheduled trigger, add an "If condition":

Use the smart value {{now.plusDays(1).dayOfMonth}} equals 1.
This condition ensures that the rule only runs on the last day of the month when the next day is the 1st of the following month.
So for days 28-31, this condition checks whether the next day is the 1st (i.e., the current day is the last day of the month).

Add ELSE IF condition, where you will check, if it is 15 day.

{{now.dayOfMonth}} equals 15.

Define the Action:

After the condition, set the action to create a ticket in the desired project.

0 votes
Laurie Sciutti
Community Champion
September 24, 2024

Hi @Daniel Bermudez ~ you'll want to use the Scheduled trigger in your automation rule with the following CRON expression

Capture.PNG

Laurie Sciutti
Community Champion
September 24, 2024

which literally translates to "At 9:00 AM, on day 15 and 30 of the month"

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