Want to send notification on last day of every month using scheduled job

--oooo--
Tera Contributor

Hello Experts,

I want to send a notification on the last day of every month .how can I achieve this using the scheduled job please guide me.

thank you.

10 REPLIES 10

Hello, @Roshan Tiwari   I have done that scripting part just tell me what should be the run condition.

I have attached a screenshot below please check it once

thank you.

write your run conditions daily. Add conditional block, so script will only execute when its last day of current month. 

What should be there in condition? do I need to write a script in condition? please guide me am a beginner.

thank you.

Yes you need to write script:

 

checkScript();
function checkScript(){
var gdt = new GlideDateTime(); //December
gs.print(gdt.getDaysInMonth());
var gdt = new GlideDateTime();
gs.print(gdt.getDayOfMonth());
if(gdt.getDayOfMonth() == gdt.getDaysInMonth()){
 return true;
}
}

--oooo--
Tera Contributor

@Ankur Bawiskar ,@Community Alums @SNOW BOT please guide me .