- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:44 AM
Hi all,
I want to create Scheduled Jobs in ServiceNow that run only on weekdays (Monday to Friday). As shown in the attached screenshot, I only see options like Daily, Weekly, Monthly, Periodically, etc., but I don’t see any specific setting to restrict the job to only weekdays.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:48 AM
check @Harish KM reply in above link
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 05:03 AM
you can use Conditional checkbox and use condition field
When it's weekday set the answer=true and if not then set answer=false
answer = false;
//Get the day of week. 1=Monday, 7=Sunday
var now = new GlideDateTime();
//Run only on weekdays
if (now.getDayOfWeekUTC() < 6) {
answer = true;
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:48 AM
check @Harish KM reply in above link
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 03:52 AM - edited 06-27-2025 03:54 AM
Hi @UdhayakumarS559
Check the "Conditional" checkbox and enter the following script in the Condition Script field.
var today = new GlideDateTime();
var day = today.getDayOfWeekLocalTime();
if(day =='6' || day =='7'){ // return 'false' if it's Saturday or Sunday
return false;
}else{
return true;
}
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2025 05:03 AM
you can use Conditional checkbox and use condition field
When it's weekday set the answer=true and if not then set answer=false
answer = false;
//Get the day of week. 1=Monday, 7=Sunday
var now = new GlideDateTime();
//Run only on weekdays
if (now.getDayOfWeekUTC() < 6) {
answer = true;
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader