Future methods are the simplest way to run something asynchronously, such as a callout from a trigger, but take only primitive parameters and cannot be chained or easily monitored. Queueable Apex does the same job better: it accepts complex types, returns a job id and can chain jobs. Batch Apex processes large data sets in chunks, each with fresh limits. Scheduled Apex runs code at set times, often to start a batch job.
Why interviewers ask this
Asynchronous Apex is how you work around synchronous limits, call out from triggers and process large data, and choosing the wrong tool causes failures and maintenance pain. The interviewer wants the strengths and constraints of each option and a sensible default. Knowing that Queueable has largely replaced future methods for new code, and how batch scope size affects limits, shows current, practical judgement.
How to structure your answer
- Describe each option in a sentence or two.
- Give the main constraints of each.
- State your default and the reasons for it.
- Mention monitoring, error handling and testing async code.
Example answer
I think of them by job. A future method is the lightweight option for running something after the current transaction, classically a callout from a trigger. It only takes primitive parameters, so you pass ids rather than records, you cannot chain it, and you get no job id to track. Queueable does the same job better, so it is my default for new code. It accepts complex types, returns a job id I can monitor, and one queueable can enqueue another to chain work in stages. Batch Apex is for volume. It splits a query over potentially millions of records into chunks, two hundred by default, and each chunk runs as its own transaction with fresh limits. I lower the scope size when each record needs heavy processing or callouts. Scheduled Apex just runs code at a set time, usually to start a batch overnight. For all of them I log failures somewhere visible, because async failures are easy to miss, and in tests I wrap the call in start test and stop test so the job actually runs.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How would you chain several jobs that depend on each other?
- What happens when a batch job fails partway through?
- How would you choose the batch scope size?
Related salesforce developer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions