- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 02:14 AM
Hi,
I have to run a Scheduled Job every Monday, Tuesday, Thursday and Friday. Could someone please let me know how to do this? I am able to run it on a particular day every week. but, this is for 4 days every week. Please let me know.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 03:39 AM
Hi Prudhvi,
Run the below code:
Run: on Demand
Conditional: True
Condition:
function excludeWednesday() {
var now = new Date();
var day = now.getDay();
var result = false;
if(day != 0 && day != 3 && day != 6) {
result = true;
}
return result;
}
excludeWednesday();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 02:20 AM
In your condition field you can check what day it is using script. Check the getDayOfWeek method in the below link
http://wiki.servicenow.com/index.php?title=GlideDateTime#getDayOfWeek.28.29&gsc.tab=0
Thanks,
Kannan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 03:39 AM
Hi Prudhvi,
Run the below code:
Run: on Demand
Conditional: True
Condition:
function excludeWednesday() {
var now = new Date();
var day = now.getDay();
var result = false;
if(day != 0 && day != 3 && day != 6) {
result = true;
}
return result;
}
excludeWednesday();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2017 05:03 AM
Hi Gowrisankar,
Could u please help me out with this? Trying to run a scheduled job at particular times
Thanks in advance.