What is the stack depth for apex batch job chaining? I am conditionally calling the same batch job from the finish method.. Also the solution implemented calls a normal batch job from the finish method and we are not leveraging Queueable Apex. What will be the daisy chaining limits for the above pattern?
1 Answer
A job may only spawn one other job in the finish method. You would need to design your job to work within this limit, so you might need a different design. There's no limit to the number of times a batch may chain (the stack depth you referred to), although there is a daily execution limit for asynchronous code (see the docs).