how to set up a job condition to exclude holidays?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 06:54 AM
Hello everyone!
I tried this script, but it returns false
var answer = new GlideSchedule("sys_id").isInSchedule(new GlideDateTime());
gs.log(answer);
type exclude
I need the schedule job not to work on holidays
how can i do it?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 08:29 AM
@Marina15 Tried and Tested solution.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 08:31 AM
it still returns false because holiday type is exluded, if i change it to any other it will return true but i can't change
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 08:34 AM
@Marina15 for holiday it should show false, that's correct right.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 10:58 PM
the problem is that if i add 5 days and it's no longer a holiday, it still returns false