DSFriends,
I have a job sequence which has 10 jobs. When one of these jobs fail, I route it through a sequencer activity and send out an e-mail notification (using notification activity) before aborting it using UtilityToAbortLog from Routine activity.
On a job failure, I also write out the job name that failed to a file. Now while sending the e-mail, I need to fetch the job name from this file and use it in the text of the e-mail message from the notification activity.
So the question is how would I get the job name from the file and use it as the text in the e-mail notification activity?
PS: If your answer is to use a dynamic parameter, please be clear in explaining how to use it in my scenario.
Thanks.
JobName of the failed job while sending e-mail notification.
Moderators: chulett, rschirm, roy
In your job sequence you have that information available to you. Each Job Activity has 3 User Activity variables associated with it, the $JobName, $JobStatus and $UserStatus. You can use those in the sequence, for instance in a User Variables Activity, to set a string value with the job name of the failed job(s) and pass that to your notification activity.
ArndW, than you for your insights on this problem of mine.
I used the User Variables Activity stage in my job sequence and I am able to pass the JobName of the failed job to the E-mail Notification Activity. But I am not sure if I can use this passed variable in the E-mail Body of this activity. I am able to use it in the E-mail Subject field by clicking the small button on the right side of the E-mail Subject filed. E-Mail body does not have anything like this.
Is it possible to use a parameter in the E-mail body?
Thanks.
I used the User Variables Activity stage in my job sequence and I am able to pass the JobName of the failed job to the E-mail Notification Activity. But I am not sure if I can use this passed variable in the E-mail Body of this activity. I am able to use it in the E-mail Subject field by clicking the small button on the right side of the E-mail Subject filed. E-Mail body does not have anything like this.
Is it possible to use a parameter in the E-mail body?
Thanks.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
1)Job1--->Job2-->..................... Job10
exceptional Handler--->execute Command Activity
2)In execute command stage call the unix script and folllowing things to be performed
a)For each Job check the Job status and if it is aborted send the mail
use dsjob -jobinfo,loop,grep,mail commands in the script
exceptional Handler--->execute Command Activity
2)In execute command stage call the unix script and folllowing things to be performed
a)For each Job check the Job status and if it is aborted send the mail
use dsjob -jobinfo,loop,grep,mail commands in the script