You need to sign in to do that
Don't have an account?
Daniel K
apex batch job with "total batches"
Hi All,
Noticed that after perparing and before processing,Total Batches field will be updated.
Want to understand if preparing is the status where START method query is executed and
based on batch size total batches gets calculated ? All this happend during perparing state of batch job ?
Can we understand if perparing is done means START method has completed successfully ?
And BEGIN method won't start executing when status is perparing?
Please comment on my above understandings.
Thanks
D
Noticed that after perparing and before processing,Total Batches field will be updated.
Want to understand if preparing is the status where START method query is executed and
based on batch size total batches gets calculated ? All this happend during perparing state of batch job ?
Can we understand if perparing is done means START method has completed successfully ?
And BEGIN method won't start executing when status is perparing?
Please comment on my above understandings.
Thanks
D
Preparing
Thanks for the link.
But that doesn't answer all my questions.
Helpful trailhead
Thanks for your answers.
The reason for my question on "total batches" was, I had an apex batch job which failed as: cpu time limit exceeded
But, this has failed during Preparing state.
In the Preparing state(START), I have only SOQL to be executed, nothing other than that.
When checked documentation on CPU time limit.. error, it is mentioned that they won't count SOQL execution time in CPU time limit.
If they don't count SOQL in CPU time limit, then how come I got CPU time limit error in my START method(during Preparing state) ?
Hope you understood what I meant.
D
This information was missing so it was hard to understand what the issue was. Considering your scenario, cpu time limit exceeded has several reasons such as workflow rules running in parallel because the code inside your START may be triggering them or even the logic that resides within the batch taking a while to run. Now without seeing the actual batch class, I am going to ask:
Is this helpful?