Scheduled jobs repeat interval

debbieslater
Kilo Explorer

Hi Everyone,

 

I'm using scheduled jobs to automatically create account management tasks. There are some that need to be created monthly, some every 3 months and some every 6 months. The monthly option is already set up in the system. I've managed to add in the Every 3 Months and Every 6 months options into the drop down menu however I'm now stuck with how to configure the settings so that they run at these periods. It seems that it auto defaults for me to put the time in hours. However what I need is it to give me the option of every 3 months/6 months starting from a given date.

 

I've done what research i can and it seems to be something to do with glide records but I can't find where these are maintained. I'm relatively new to Service Now so just a point in the right direction would be great

 

Thanks in advance,

 

Debbie

7 REPLIES 7

Sanjeev Kumar1
Kilo Sage

HI,


I think it will work correctly.



for more details see


wiki.servicenow.com/index.php?title=Creating_a_Scheduled_Job


Hi Sanjeev,



Thanks for the speedy response. I checked this article and it has helped me get as far as I have got however it doesn't solve my problem of not being able to schedule it to run every 3 months from a given date, if you see my screenshot attached it is the 'time' section I am trying to change.



If i use the periodically option this only allows me to configure it in days and not in months. So I could use 90 days for the 3months on however sometimes this wouldn't be quite correct!!


rajesh73_k
Kilo Expert

ONCE YOU SET THE FREQUENCY OF SCHEDULE JOB, IT RUN AUTOMATICALLY.



This functionality is out of box.


Kindly refer:


wiki.servicenow.com/index.php?title=Creating_a_Scheduled_Job


ohhgr
Kilo Sage
Kilo Sage

Hi Debbie,



A simpler approach would be to keep the scheduled job monthly for all 3 of your requirements. And just add below code at the beginning of the script.



//for 3 months


var gdt = new GlideDateTime(); //December


var monthNumber = gdt.getMonthUTC();



if(monthNumber % 3 == 0) {


//write the script


}



Hope that helps.



Thanks,
Mandar