how to send 7 days email reminder in scheduled job?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 05:30 AM - edited 09-06-2023 05:48 AM
Hi .
I have this requirement that I need to send email reminders for 7 days if the employee doesn't answer the survey and need to send this starting tuesday. Once the survey is answered it will also stop sending email reminders
Does anyone know how to create this in a scheduled job?
I appreciate your help. Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 05:40 AM
Hi @Dizy M,
Please follow the steps below
- Create a new Event (Event > Registry) on Assessment Instance table
- Create a new Email > Notification for the assessment instance table) and associate the above event
Ensure your notification has
- Send to event Creator true
- Event parm1 contains recipient as true
- Create schedule job which runs daily and checks the records and sends notification to the user
Script:
sendNotification(); function sendNotification(){ try{ var gr = new GlideRecord('asmt_assessment_instance'); gr.addEncodedQuery('stateINready,wip^userISNOTEMPTY'); gr.query(); while (gr.next()) { gs.eventQueue('event_name', gr, gr.user, ''); } } catch(ex){ gs.info(ex); } }
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 06:56 AM
Hi @Peter Bodelier thank you for sharing this however i have like 7 email reminders , they have different subject because for the 1st reminder the subject is like "Reminder 1 " so on and so forth but the email body are the same.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 07:07 AM
Easiest is to create 7 events, and link each notification to the corresponding one.
You could also do it by setting the second event parameter to a certain value, and fill the subject based on that by using a mail script in the notification.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.