Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Apex Flex Queue entry
How-to guide

How to manage the Apex Flex Queue in production

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.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 19, 2026

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.

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

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

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

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

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

Gotchas
  • 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.

See the full Apex Flex Queue entry

Apex Flex Queue includes the definition, worked example, deep dive, related terms, and a quiz.