cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger System_Mail_Send for Canceled Jobs

Former Member
0 Kudos

Hello,

I was trying to create Trigger to send email when a job was in "Canceled", "Error" , "Killed" and "Unknown" status.

However, emails were successfully sent for all statuses except "Cancel". I'm using "Before Job Post Running" as Trigger Point. Is this the correct Trigger Point for checking job with "Canceled" status?

Can somebody pls advise me on how to go about this one?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

nanda_kumar21
Active Contributor
0 Kudos

Does it work when you get the JobStatus output as string and check against "A", which is the String equivalent of canceled status in job status table?

thanks

Nanda

Former Member
0 Kudos

Hi Nanda,

No email send as well when i change the job Status as String for Job Post Running Trigger.

I created another Trigger using Trigger Point "Before Job On Change". When i submited a scheduled Job#A, a System_Mail_Send was created by this trigger in "Scheduled" status. When i canceled Job#A, the System_Mail_Send created by the trigger ("Before Job On Change".) was canceled as well.

nanda_kumar21
Active Contributor
0 Kudos

Is it possible to share more of the trigger code here?

When you changed the job status as String, did the cancelled job return it as "A"? did you debug to find whether the returned value is correct? Did the value persist throughout till mail send?

thanks

Nanda