2

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 1

5

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).

2
  • Thanks for the answer. I am just spawning one job from the finish method. So it seems there are no limits to the chain length.
    – nonce
    Commented Aug 11, 2015 at 18:23
  • Correct. Aside from daily governor limits, no other limitations.
    – sfdcfox
    Commented Aug 11, 2015 at 18:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .