Need help creating an Assignment Rule that will only triggering during a specified Schedule record.

JR42
Giga Guru

Hi.  I need an Assignment Rule that will only trigger during a specified Schedule in System Schedule > Schedules > Schedules.

 

The schedule is called, '6-6 weekdays, excluding holidays'.

The Assignment Rule would then only trigger M-F between 6AM and 6PM, but not on holidays.

The '6-6 weekdays, excluding holidays' schedule is already set up, so I just need a script that will tell the Assignment Rule to only run if the current date and time are within that schedule.

 

Any help would be greatly appreciated!  So far I have not had any luck with this.

1 REPLY 1

Ahmmed Ali
Mega Sage

Hello @JR42 

 

You can create a new business rule to run on your task table and check if current date/time is in your schedule (you can create one in schedules table as per your requirement) and based on that populate assignment group.

 

Below thread has script to check if given date/time is in the schedule:

https://www.servicenow.com/community/developer-forum/how-to-determine-if-a-given-date-is-within-a-gi...

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali