- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 05:10 PM
I have a scheduled data import, and I'd like an email notification letting me know every time it runs. In my "scheduled data import" I assume I want to check the box "Execute post-import script" and then put the code there. I just don't know how to write the script.
Help greatly appreciated ,
Cathy
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 06:29 PM
Hi Cathy,
1) Create a custom event in this post-import script. The OOTB Incident Events BR will give you code examples to use. In this example, I've created a scheduledjob.completed event. You could name this event to whichever you prefer.
Script:
gs.eventQueue("scheduledjob.completed", current, gs.getUserID(), gs.getUserName());
2) Register this event name in the event registry, System Policy > Registry;
The name of the event is the same as what is in step 1 e.g. "scheduledjob.completed"
3) Create an email notification against this event.
In your email notification, configure your email, send when Event is fired. Choose the name of your event which should be listed in the drop down now because of step 2 above.
Complete configuration of your email notification.
Test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 06:29 PM
Hi Cathy,
1) Create a custom event in this post-import script. The OOTB Incident Events BR will give you code examples to use. In this example, I've created a scheduledjob.completed event. You could name this event to whichever you prefer.
Script:
gs.eventQueue("scheduledjob.completed", current, gs.getUserID(), gs.getUserName());
2) Register this event name in the event registry, System Policy > Registry;
The name of the event is the same as what is in step 1 e.g. "scheduledjob.completed"
3) Create an email notification against this event.
In your email notification, configure your email, send when Event is fired. Choose the name of your event which should be listed in the drop down now because of step 2 above.
Complete configuration of your email notification.
Test.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2014 03:42 PM
Jordan, thank you! That worked for me.