How to Schedule reports on hour basis?Report for EVERY HOUR between 8PM to 500 AM

sowmyab
Giga Contributor

Hi,

How to Schedule reports on hour basis?Report for EVERY HOUR between 8PM to 500 AM

In schedule jobs- i didn't found option for hour basis (Run-   Daily,Weekly, monthly , periodically)

Please suggest me the how to achieve this?

Thanks

5 REPLIES 5

Wayne Richmond
Tera Guru

I believe if you switch Run to Periodically you can set the report to run every 1 hour. I don't think you can limit it to between a certain time though:


find_real_file.png


You could just create 10 Daily reports to run at 8 9 10 11 12 1 2 3 4 5.


ks2015
Kilo Contributor

You can set the Run to Periodically with 1 hour interval.   Select "Conditional" and with the script in below.



Capture.PNG



Capture2.PNG


Ken,



      I am trying to schedule a report that will only run 8AM to 5PM CST.   Below is what I have configured from yesterday, but it ran every hour throughout the evening and night so it ignored the condition.   Thank you for any help you can give.  



find_real_file.png



Shane


**FINAL SOLUTION**


In case it helps anyone, here is the script to make the scheduled report run only from 8 AM to 5 PM.



//Return 'true' to run the job


timeToRun();




function timeToRun(){


var tod = new GlideDateTime();


var hr = tod.getLocalTime().toString().slice(11,13);


var answer = false;


gs.log ('INT3414978 SNC Test Log: ' + hr );


if(hr >= 08 && hr <= 17) {


answer = true;


gs.log ('INT3414978 SNC Test Log: Inside condition ' + hr );


}


return answer;


}