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?


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

  • 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
    Aug 11 '15 at 18:23
  • Correct. Aside from daily governor limits, no other limitations.
    – sfdcfox
    Aug 11 '15 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.