Forums

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

Automation with Conditional Logic Based on Day of the Week

Lara Sousa
Contributor
June 27, 2025

I am setting up a cloning automation with the following execution logic:

  • Do not run on Saturdays and Sundays

  • Execute a specific flow from Monday to Thursday

  • Execute a different logic on Fridays

However, the automation did not run today, which is Friday.
I would appreciate your support in reviewing the logic to identify any potential issues. Please find the current configuration below for validation.

1.png2.png3.png

2 answers

1 accepted

4 votes
Answer accepted
Alex Kovell
Contributor
June 27, 2025

I'm not familiar with the syntax you are attempting; however, the following will meet your requirements and arguably is easier for a human unfamiliar with the content to read.

  • First IF {{smart values}} condition:
    • {{now.dayofWeekName}} 
    • does not match regular expression
    • (Saturday|Sunday)
    • EDIT - use @Trudy Claspill's alternative to the first IF statement presented below instead of this one.
  • Second IF/Else with a {{smart values}} condition:
    • {{now.dayofWeekName}}
    • exactly matches regular expression
    • (Friday)

jira_m-f_automation.jpg

Lara Sousa
Contributor
June 28, 2025

Thank you @Alex Kovell 

1 vote
Trudy Claspill
Community Champion
June 27, 2025

Hello @Lara Sousa 

If you don't want the rule to run at all on Saturday and Sunday you can change the Scheduled trigger Occurrence configuration to run "weekly" and pick every day of the week except Saturday and Sunday. Then you don't need the first Condition in your rule at all.

Screenshot 2025-06-27 at 3.35.39 PM.png

Alex Kovell
Contributor
June 30, 2025

@Lara Sousa@Trudy Claspill's alternative presented here to my first IF statement is better than the first half of my proposal. While both will work, this will eliminate the need for the entire first IF statement.

Suggest an answer

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

Atlassian Community Events