How to schedule a report to run at 3 times in a day (9 , 12 and 16) from Monday to Friday only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2017 10:23 PM
We have requirement to schedule report to run at different time intervals in a day ( not uniform) during weekdays , is there a way it can be done to schedule report with the above requirements.
Thanks.
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2017 04:33 AM
Hello Teja,
Please check this , It might be helpful
How to set repeat interval for scheduled job based on condition?
Please mark Helpful if the article is useful for your query
Rajesh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2018 08:07 AM
Did you get an answer that worked for you. I'm need to do the same thing but only two times a day at 8 and 5.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-30-2018 01:06 PM
I got this working for me with the below code.
answer = ifScript();
function ifScript(){
var d = new GlideDateTime(); //setup date time object
d.setValue(gs.nowDateTime()); //set to current date/time
var dt = d.getTime().toString().split(" ")[1];
var time = dt.split(":")[0]; //Gets Hours
if(d.getDayOfWeekUTC() != 6 && d.getDayOfWeekUTC() != 7){ //Keep from running on Saturday and Sunday.
if(time == "08" || time == "17"){ //run at 8 AM and 5 PM
return true;
}
else{
return false;
}
}
}
Had to modify the code slightly. Need to use 08 instead 8 for 8 am since ServiceNow uses military time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2022 06:08 AM
Hi Brian,
if we use the timings as 4:30 AM and 12:45 than what can we put.
Thanks in Advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2022 07:33 AM
Is that 12 AM or PM?