How do you chain Queueable jobs and what are the limits?
Suggested answer
Queueable chaining: within the execute() method of a Queueable, you can enqueue another Queueable using System.enqueueJob(new NextJob()); This creates a chain of async jobs that execute sequentially. Limits:
1. In Developer/Sandbox orgs, chains are limited to 5 depth levels.
2. In Production, chains can be unlimited depth but are subject to the 250,000 async jobs per 24h org limit.
3. Only one child job can be enqueued from within a single execute() call. Error handling: if a job in the chain fails, subsequent jobs do not execute. Implement try-catch with error logging and conditional chaining. Use Queueable chaining for sequential processing (e.g., paginated API calls where each job processes one page and enqueues the next).
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.