Forums

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

Daily automation, excluding weekends

Lara Sousa
Contributor
June 23, 2025

I'm creating an automation in Jira that will run daily. However, I need a conditional to not run when the day of the week is Saturday or Sunday. How do I proceed? I've already tried to configure some IF logic, but without success.

2 answers

1 accepted

6 votes
Answer accepted
Brita Moorus
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.
June 23, 2025

Hi, @Lara Sousa! 👋

You can achieve this by choosing trigger "Scheduled" and from there weekly occurrence. You can select the days you want to execute the rule.

Screenshot 2025-06-23 at 22.30.01.png

Additionally, you can achieve the same result using CRON expression: 0 9 * * 1-5

This means run at 9:00 AM only on Monday to Friday.

Hope this helps! ✨

1 vote
Trudy Claspill
Community Champion
June 23, 2025

Hello @Lara Sousa 

When asking for help with an automation rule, it will enable us to help you more effectively if you provide us with the following:

1. Screen images that show your entire automation rule.

2. Screen images showing the details of each component of the rule.

3. Screen images showing all the details available in the Audit Log from an execution of the rule.

4. A detailed explanation of what you think the rule should be doing, and a detailed explanation of what you observe the rule is actually doing.

Without that information we can provide educated theories about why your rule doesn't work as expected, and suggestions about how to change it, but those may not end up being applicable based on the construction of your rule.

 

Having said all that, here is my educated suggestion for a method to check if the rule is executing on a specific day of the week.

Referencing the documentation on smart values for dates and times:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

...and the Java documentation referenced therein about formatting dates and times:

https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html

The smart value {{now()}} will give you the current date/time in UTC.

If you want to convert that to a specific timezone you need to use the function convertToTimeZone([timezone])

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Convert-timezone-date---

You can then also use the formatting options to determine the day of the week for the date/time.

{{now.convertToTimeZone("America/Los_Angeles").format("EEE")

That will give you the day of the week in text format; i.e. Mon, Tue, Wed, Thu, Fri, Sat, Sun

You can then compare that result to the text for Mon through Fri, and proceed with the actions of the rule only when there is a match.

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