Schedule job run on every Monday Wednesday and Friday for deleted incidents which are category is Hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 12:05 AM
Hello Team,
Schedule job run on every Monday Wednesday and Friday for deleted incidents which are category is Hardware or Software. Please send me the solution.
Thanks
Panduranga K.
- Labels:
-
Scripting and Coding
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 12:11 AM
HI
You can use this solution :
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2022 09:45 PM
HI
Any update to this ?Any follow-up required? if not
Kindly mark the answer as Correct & Helpful both such that others can get help.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2022 12:15 AM
Hi,
you can make the job run daily and in the condition field check if it's Monday/Wednesday/Friday
I hope you are comfortable in writing scheduled job script
answer = checkCondition();
function checkCondition(){
var gdt = new GlideDateTime();
var dayOfWeek = gdt.getDayOfWeekLocalTime();
// 1 is Monday, 2 is Tuesday
if(dayOfWeek == 1 || dayOfWeek == 3 || 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
07-29-2022 11:31 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader