Job abort message as an attachement in email notification
Moderators: chulett, rschirm, roy
Job abort message as an attachement in email notification
Dear All,
I have requirement with when ever job fails in a sequence i need to send the error message with the job failed along with job status in email notification.
I am not sure of to how to get the aborted message and send as an attchement in email
Looking farward for suggestion from any one
Thanks
I have requirement with when ever job fails in a sequence i need to send the error message with the job failed along with job status in email notification.
I am not sure of to how to get the aborted message and send as an attchement in email
Looking farward for suggestion from any one
Thanks
RD
The Notification Activity stage will do that automatically in a Sequence job if you enable the 'Include status' option. Now, it won't be an attachment but you should have the basic information you need with very little effort.
If what you 'need' to pull are the actual error message(s) from the job's log and attach them, you'll need some custom code that leverages the API for the various DSGetLog functions and writes that information to a flat file. The Notification Activity stage can then send that file as an attachment. Or you can script all that from the command line using dsjob and something like sendmail if (for example) you have a job 'wrapper' script that launches all of your jobs.
If what you 'need' to pull are the actual error message(s) from the job's log and attach them, you'll need some custom code that leverages the API for the various DSGetLog functions and writes that information to a flat file. The Notification Activity stage can then send that file as an attachment. Or you can script all that from the command line using dsjob and something like sendmail if (for example) you have a job 'wrapper' script that launches all of your jobs.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: