If we want run scheduled job at Monday and Friday only then can we do in one schedule job if no then what will we do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 09:37 AM
If we want run scheduled job at Monday and Friday only then can we do in one schedule job if no then what will we do?
- Labels:
-
Task Communications Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 09:42 AM
Hi Rajini,
Check the below option in schedule so you can add only Monday and Friday to run the Job
- Periodically: Runs on a designated repeating interval
Thanks
Chandu Telu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-01-2022 09:46 AM
Hi,
Only 1 scheduled job is enough
You can make it run daily and check if today is Monday or Friday in the condition field and if it evaluates as True then the script would run
answer = checkCondition();
function checkCondition(){
var gdt = new GlideDateTime();
var dayOfWeek = gdt.getDayOfWeekLocalTime();
// Monday is 1 and there onwards
if(dayOfWeek == 1 || dayOfWeek == 5)
return true;
else
return false;
}
Regards
Ankur
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-07-2022 08:07 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:38 PM
Hi @Ankur Bawiskar!
Can we run one scheduled job at 2 am from Monday to Friday and at 8 am on Saturday and Sunday?
If yes, how should I do that.
Thank you