- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 05:40 AM
The ask is to have the record producer send incidents to a different assignment group for after hours work in a different timezone. To begin work on this, I have set up a schedule [cmn_schedule] and am wanting to create a script that will run against a record producer to determine if it's after hours and update the assignment group accordingly.
Is there a way I can query the schedules table and see if the current date/time falls within the schedule?
Thanks for all your help! I'm also open to other ways to accomplish this, but I figured schedules was a good place to start since it would handle time zones nicely.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 06:58 AM
Hi William,
Upon closer inspection, your schedRec.get() will likely not work. With one argument, this method is looking for a sys_id. You gave it a name. You should change it to:
if (!schedRec.get('name', 'Overnight Hours (Sogeti RIM)'))
return 'no';
As for the rest, I recomment testing it in scripts background to ensure your functionality before deploying it in a business rule, workflow script activity, etc.
This should help (I just made it last night because this comes up so often.)
Faster Server Side Script Development and Test

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 05:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 06:09 AM
Thanks Mr. Tomasi! Not sure how that did not come up in my search. That article was very helpful!
I am having some troubles with the time zone changer in Geneva (Activate the Time Zone Changer ), I have the UI macro active but am not seeing anything in the header bar. The preferences for the roles are admin and itil. Any thoughts on why this isin't showing?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 06:11 AM
Hi William,
Are you using UI15 or UI16?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2016 06:16 AM
UI16. I bet that's why, huh?