How do I create an off hours automated response, specifically for the weekends?
Asked by Ken Obsequio:

Hello!

I'm currently exploring options to automate responses during specific non-coverage hours within our SLA calendar.  

Specifically, we want to address the period: **between Friday 6 PM and Sunday 4 PM.**

Could anyone provide insights or suggestions on the best approach to achieve this automation within our support system?

Any tips, recommended tools, or strategies would be greatly appreciated.

Thank you in advance for your help!


Answers:
author: Carlos Faddul
body: Hi [@Ken Obsequio](/t5/user/viewprofilepage/user-id/5426537)

I have an automation that maybe help you, you will need to update to your case

Using a if/else condition

In the first condition basead in out of office hours, with or condition
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").dayOfWeekName}} *++**equals**++*Saturday
>
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").dayOfWeekName}} *++**equals**++*Sunday
>
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").shortTime}}***++less than++*** 8:00 AM
>
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").shortTime}} ++***greater than***++ 6:00 PM

Find your timezone here \>\> <https://joda-time.sourceforge.net/timezones.html>

In the second condition basead in during office hours, with or condition
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").dayOfWeekName}} ***++does not equal++*** Saturday
>
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").dayOfWeekName}} *++**does not equal**++*Sunday
>
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").shortTime}} *++**greater than**++* 8:00 AM
>
> {{created.convertToTimeZone("**YOUR_TIMEZONE_JAVA** ").shortTime}} *++**less than**++* 6:00 PM

![Community Automation.png](https://community.atlassian.com/t5/image/serverpage/image-id/320698iB457D33473A0EEB6/image-size/large?v=v2&px=999 "Community Automation.png")

I hope I helped you.

If this post was helpful, mark it as "**Accept Answer**" , so you can help others who may have the same difficulties.

If your question has not been resolved, please post again with more details.

comments: author: Duc Vu
body: Thanks, Carlos, we are testing this out and had success with one day so far. If we were to implement this schedule with these being our off hours:

Friday: After 6PM

Saturday: All day

Sunday: Until 4PM

Do you suggest trying to consolidate all of this into one automation, or 3 separate ones?

Thanks,

Duc


author: Mikael Sandberg
body: You can do this via automation that checks when the issue was created and if it falls within those days and hours send the email. This would be similar to the automation that I mentioned in this article, [Assign requests to agents based on the hour of the day/on-call schedule](https://community.atlassian.com/t5/Jira-Service-Management-articles/Assign-requests-to-agents-based-on-the-hour-of-the-day-on-call/ba-p/2553353). What you would have to add is a check for the day or the week, which can be done with the [Date and Time](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/) smart values.


Tags: cloud

jira-service-management

jira-service-management-cloud