how to generate scheduled job on 15 jan every year?

Khushboo8
Tera Contributor

how to generate scheduled job on 15 jan every year and suppose year is leap year then what to do ?

12 REPLIES 12

Can I write the above script without event registry ??


you mean, without creating event?



Yes, can be done.. you just need to delay the script execution for 24 hours. You can also replace the above code as:



if((currYear%4)==0)


  {


  sleep(86400);




var req = new GlideRecord("sc_request");


req.assignment_group = 'sys id of group where request should be routed';


req.insert();



}



else


{


var req = new GlideRecord("sc_request");


req.assignment_group = 'sys id of group where request should be routed';


req.insert();


}


-------------------





thankyou anurag