Most batch jobs flow through the Flex Queue without intervention. Knowing how to reorder, cancel, and monitor it pays off when something urgent shows up at the back of a long queue.
- Open Apex Flex Queue in Setup
Setup, then search for Apex Flex Queue. The page lists every batch job currently in Holding status with submission timestamp and submitter.
- Reorder a holding job
Drag the urgent job to the top of the list, or use the Move to Top button. The change applies immediately; the next running slot will pull the new top job.
- Cancel a holding job
Click Cancel next to any holding job that should not run. Once cancelled the job moves to Aborted status and cannot be resumed.
- Monitor active jobs
Switch to Setup, Apex Jobs. Filter by Status Processing or Queued to see what is currently running and what is about to start.
- Build alerting around hold counts
Schedule a Flow or anonymous Apex to query AsyncApexJob WHERE Status='Holding' and alert when the count exceeds 80. Catching saturation early prevents the 100-job error.
- The five-concurrent and 100-queue limits cannot be raised. Right-size submission patterns; do not try to grow past them.
- Reorder only applies to Holding status. Jobs that already moved to Queued or Processing cannot be moved.
- Chained batches that submit themselves can lockstep the queue if upstream submission is unthrottled. Add explicit pacing at the submission layer.
- Cancelling a holding job does not roll back any work it set up earlier in a chain. Handle compensating logic explicitly.