It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scheduled Alerting?

Hello Cool People,


We have used the ScriptRunner add-on to create a new Send Custom Email listener that would trigger everytime a "Critical" Priority Ticket is created. Basically, this will just send an email alert to the  a group of people and so far this has been working like a charm. I'm just wondering if someone here in the community had tried or can point me  to a right direction on how to make this run on a schedule? 

Right now, the alerting runs all day and triggers everytime a critical ticket is created.  We wanted this to just trigger when a critical ticket is created between 4:00PM - 8:00PM.  

Hopping someone can shed some light and share their expertise on this.





2 answers

1 accepted

2 votes
Answer accepted

Hi Lorenze,

You can use the send custom email listener with the following condition:

def hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY) == "Critical" && hour >= 16 && hour < 20

Hope this helps,

Works like A Charm. Thanks you so much @Adam Markham [Adaptavist]. Once last question before resolving this. How do we Specify a certain day of the Week?

Thanks for the awesome condition that you have given.

You can incorporate day of week in the condition like so:

def hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY)
def dayOfWeek = Calendar.getInstance().get(Calendar.DAY_OF_WEEK) == "Critical" && hour >= 16 && hour < 20 && dayOfWeek == Calendar.MONDAY

This will send an email for a critical issue created between 4 - 8pm on Monday only.

Hello Adam,


This works like a charm. Thank you so much.




Maybe you can do it from a post-function attached to the create issue transition checking the current time.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

851 views 7 0
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you