Scheduled job

rahul122
Tera Contributor

How do i run a scheduled job quarterly on 1st,20th,30th of each till now i worked on this code this seems not be working :

 

(function() {
var today = new GlideDateTime();
var day = today.getDayOfMonth(); 
var month = today.getMonthUTC(); 


if ((day == 1 || day == 10 || day == 20) && (month == 0 || month == 3 || month == 6 || month == 9)) {
var templates = new StdChangeUtils().getNotUsedTemplates(gs.getProperty('change.std.months_before'));
if (templates.length > 0) {
gs.eventQueue('change_form_inactivity', null, templates.toString(), '');
}
}
})();

5 REPLIES 5

Still the code is not triggering the notification