Want to send notification on last day of every month using scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 08:52 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 11:23 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 11:35 AM
write your run conditions daily. Add conditional block, so script will only execute when its last day of current month.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 11:50 AM
What should be there in condition? do I need to write a script in condition? please guide me am a beginner.
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 11:52 AM
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;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-26-2023 10:49 AM - edited ‎03-26-2023 11:15 AM
@Ankur Bawiskar ,@Community Alums @SNOW BOT please guide me .