function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vee_RVee_R 

Batch class issue

Hi All,

We have a batch class which runs daily. Issue is that sometimes batch is not processing records. We have something like this-
Start(){
  query
  create batch log record with status='processing'- say BL1
}
Execute(){
   try{
        some DML operation on the list in the scope
   }
   catch(exception){
         Update Batch Log record BL1 with status='Failed in execute'
    }
   Update Batch Log record BL1 with status='Completed'
}
This year batch has run daily except three times. We can see BL1 has status='processing'. It was never updated to either completed or failed in execute. Please let me know on how to track exact error.

Thanks in advance!