I have a job object (Windows Job) which runs every 4 hours and should send an alert email when the RC >< 0
when job fails which can be seen in the attached job report, we are not getting the notification email and in report it shows that Job terminated successfully and the status gets ENDED_OK.
Please let me know what needs to be done
It appears to me that your solution threw some error messages, like this one;
System.Exception: Failed while getting Orders ---> System.Data.SqlClient.SqlException: Login failed for user 'nw_user'.
But it did not change the return code to a non zero value.
Usually what I do in cases like this, is build a UC4 FILTER object and attach it to the OUTPUT.SCAN tab of the job. The UC4 FILTER feature can automatically scrape your reports for text strings and you can tell the OUTPUT.SCAN tab to set a non-zero return code when it gets a hit. Or better yet, build a FILTER object that scans for a "good end of job" message. That way any sort of unexpected error message would be trapped.
FILTER object did work as required.
Thanks a lot for your help on this.