on 07-06-2017 6:17 PM
We have a procedure in HANA and an XS job that triggers Procedure on every day,
We Need your help to check whether there is any Alert mechanism I.e. sending an email when the job fails.
Any setting in XS application or any procedure that checks the JOB_LOG table and send an email when it finds a failure status for the job. Thank you in Advance.
We are using try catch block to catch any errors and send a email out.
//catch exception catch (e) { //get error message code = e.message; //set body var output = 'Job failed'; //send email var mail = new $.net.Mail({ //Sender Address sender: {address: "sender address"}, to: [{name: "TEST_NAME", address: "test@test.com", nameEncoding: "US-ASCII"}], subject: "Job Failed", subjectEncoding: "UTF-8", parts: [ new $.net.Mail.Part({ type: $.net.Mail.Part.TYPE_TEXT, text: output + 'With Error ' + code, contentType: "text/html", encoding: "UTF-8" })] }); mail.send(); }
Thanks
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are using try catch block to catch any errors and send a email out.
//catch exception catch (e) { //get error message code = e.message; //set body var output = 'Job failed'; //send email var mail = new $.net.Mail({ //Sender Address sender: {address: "sender address"}, to: [{name: "TEST_NAME", address: "test@test.com", nameEncoding: "US-ASCII"}], subject: "Job Failed", subjectEncoding: "UTF-8", parts: [ new $.net.Mail.Part({ type: $.net.Mail.Part.TYPE_TEXT, text: output + 'With Error ' + code, contentType: "text/html", encoding: "UTF-8" })] }); mail.send(); }
Thanks
Srini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srini,
Did you figure out teh way to achieve this? We have similar requirement to generate emails whenever teh XS Job fails or succeeds.
Let us know if you can help us achieve the same.
Regards
Debanshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.