Sending a notification during business hours only

reza1921
Tera Contributor

Hi all,

 

I have used the inactivity monitor to fire an event and I am using that event to trigger a notification.

 

However, I need the notifications to be sent during business hours only. I.e. 0600-1800.

 

Could you tell me how I do that?

 

reza1921_0-1686807337625.png

 

2 REPLIES 2

Aman Kumar S
Kilo Patron

Hi @reza1921 ,

You can use eventQueueScheduled for this purpose, just write a logic to check if current time is within the work time if yes, then let it go with eventQueue, but if it is beyond, you can use eventQueueSchedule to ensure it goes within the working hours.

For checking if current time is within the working hours, create a schedule and use GlideSchedule APi to validate:

Ref article:

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/c_GlideScheduleScopedAPI

checkout this article for eventQuuescheduled:
https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/no-namespace/c_GlideSystemScope...

 

Best Regards
Aman Kumar

Community Alums
Not applicable