+ Start a Discussion
RovRov 

Scheduled job not executing correctly

I have a scheduled job that sends Compliance Notification emails to an Account's key contact. If an invalid email is encountered, the job fails and no emails are sent even to valid addresses. However, when i look at Monitoring Apex jobs under set up, the status is 'Completed' and status detail displays the specific error. Further, on the Account record the Notification Status doesn't change from 'Draft' to 'Sent'.

Best Answer chosen by Admin (Salesforce Developers) 
r1985r1985

Hi,

 

This is the standard functionality of SFDC that any uncatched exception occurs it wont proceed further. For this u can either put a condition to check the email is valid or not else u can catch those exceptions in a try catch block.

 

Thanks,

Malar

All Answers

r1985r1985

Hi,

 

This is the standard functionality of SFDC that any uncatched exception occurs it wont proceed further. For this u can either put a condition to check the email is valid or not else u can catch those exceptions in a try catch block.

 

Thanks,

Malar

This was selected as the best answer
RovRov

Thanks Malar