I have an apex batch job, to query all closed cases older than 13 months. I have implemented the Stateful interface to that I can accumulate all the rows over the several batches that will execute.
However, only a portion of the batches will process. There should be more than 96,000 records, but I receive only around 24000 records when the finish method is executed. If I set the scope to 2000,
the AsyncApexJob shows only 11 or 12 of the 48 total batch jobs. How can I get the rest of the batches to execute?
Whats the possible cause and how to find that?