Trigger weekly notification

coolsaurabh
Tera Contributor

Hi All,

 

I need to send weekly notification as per below requirement:

 

Table : sn_vul_app_vulnerable_item

To Whom : Assigned To

When : Monday

 

Content : Link of all vulnerable item assigned to that specific person

 

Please help me how can I achieve it.

 

Thanks,

Saurabh

 

1 REPLY 1

Sid_Takali
Kilo Patron
Kilo Patron

Hi @coolsaurabh For this you need 3 things.

1. Event - System >> Event Registry

2. Notification - System Notification >> Email >> Notifications

3. Scheduled Job - System Definition >> Scheduled Job.

 

Use below script in Scheduled Job script condition

var gdt = new GlideDateTime();
var dayOfWeek = gdt.getDayOfWeekLocalTime();
if (dayOfWeek == 1)
    answer = true;
else
    answer = false;

 

Refer below thread to send notification via scheduled job

https://www.servicenow.com/community/developer-articles/notify-using-scheduled-jobs-in-servicenow/ta... 

https://www.servicenow.com/community/developer-forum/how-to-create-email-notification-through-schedu...