Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

I want to send an auto trigger email to customers that can run on every 1st and 4th friday of month

Lakshmi Kumari February 9, 2024

Hi Team,

I want to send an auto trigger email to customers that can run on every 1st and 4th friday of a month. However the automation rule is allowing me to choose only 1st Friday but i dont have the option to choose 4th Friday of every month. I have attached a snapshot for your reference. Please review and help me in selecting 4th friday of a month along with 1st Friday of a month.

Screenshot 2024-02-09 at 8.39.05 PM.png

1 answer

0 votes
Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 9, 2024

Hi @Lakshmi Kumari ,

 

For the 4th friday of the month, you can set up a separate schedule rule using cron expression. Click on "Advanced" on the Scheduled dialog and use the following cron expression

0 0 6 22-28 * 5

The cron can be dissected as below:

* 0 - seconds

* 0 - minutes

* 6 - hour

* 22-28 - dates on which cron will run. This is because the 4th Friday of the month can only fall between 22nd and 28th.

* * - month (any)

5 - day of the week (Friday)

 

So this cron will run at 6 AM on any Friday of the month that falls between 22nd and 28th.

 

Hope that helps!

Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 9, 2024

Actually I think you can cover both use cases in a single cron with something like this

0 0 6 1-7,22-28 * 5

With 1-7, and 22-28, you can cover the first and 4th weeks, and the 5 at the end ensures it only runs on Fridays. 

Lakshmi Kumari February 10, 2024

Thank you Hariharan. Single cron worked for both the date conditions.. You are a saviour :-)

 

Cheers,

Lakshmi

Hariharan Iyer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2024

I'm glad it worked. I just discovered there's a simpler way of doing this too. You can just use 5#4 for the 4th Friday of the month. So the cron can also be specified as

0 0 6 * * 5#1,5#4

Please check this documentation for more details.

Suggest an answer

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

Atlassian Community Events