- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 03:06 AM
I need to create Scheduled Jobs following a script we created that initiates a Catalog Item, and the Scheduled Job needs to run daily and exclude weekends but I don't see how to select Daily excluding weekends. Any suggestions/direction would be appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 03:15 AM
Check the conditional field and add following script
var result = true;
var gdt = new GlideDateTime();
var day = gdt.getDayOfWeekLocalTime(); //The day of week value from 1 to 7. Monday equals 1, Sunday equals 7.
if(day==6||day==7)
result =false;
result ;​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 03:30 AM
Hope this link will help you-
https://community.servicenow.com/community?id=community_question&sys_id=9201808fdb94d34c0e58fb651f9619be
Please mark as helpful..if it helps you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2021 04:25 AM