cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send mail using System_Mail_Send

Former Member
0 Kudos

Hello All,

I am new to Cronacle and learning to write scripts. I have written a script which sends mail using SYSTEM_MAIL_CONFIGURE and SYSTEM_MAIL_SEND when a job fails i.e. the Job status turns to Error.

But my problem is  SYSTEM_MAIL_CONFIGURE and SYSTEM_MAIL_SEND are getting completed first and whereas the job i am tracking for Error is still in Running state. How to ensure that the job used for sending mails get executed only once the above job has completed execution so that i can check its status for Error and than only i trigger the SYSTEM_MAIL related jobs.

Also i have to write a generic script which works for any job so i cannot use Alerting module.

Can somebody please advice me on how to go about this one?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

nanda_kumar21
Active Contributor
0 Kudos

there are examples for pre-running and post-running actions in the admin guide, where you can include your script to send an email when the particular job fails or you can write a trigger for all jobs.

You don't have to run the System_mail_configure job everytime, it is a one time configuration.

In the long run, and if you have a large volume of jobs, writing a trigger may not be efficient and it will affect the system performance.

Alerting module is the correct way to do it.

Thanks

Nanda

Answers (0)