Apex Flex Queue
Apex Flex Queue is a Setup page that displays batch Apex jobs that are waiting in the flex queue before being processed.
Definition
Apex Flex Queue is a Setup page that displays batch Apex jobs that are waiting in the flex queue before being processed. The flex queue holds up to 100 batch jobs in a "Holding" status when the system's five concurrent batch processing slots are full. Administrators can reorder jobs in the queue to prioritize critical batch processes.
In plain English
“Here's a simple way to think about it: Apex Flex Queue is the waiting room for batch jobs. Salesforce only runs five batch jobs at once; the rest wait here in line. You can see what's queued and reorder priorities - push the urgent batch ahead of the routine ones.”
Worked example
At DataSync Corp, multiple batch jobs run overnight for data cleanup, report generation, and email sends. The admin opens the Apex Flex Queue and sees eight jobs waiting. She moves the critical data quality batch job to the top of the queue so it processes first, ensuring clean data is available for the morning reports.
Why Apex Flex Queue is where batch jobs wait their turn in line
Salesforce processes only five concurrent batch Apex jobs at a time. Jobs submitted past that limit go into the Flex Queue, holding in a queued state until a slot opens. Apex Flex Queue is the page that shows you what's waiting, in what order, and lets you reorder priorities - push a critical batch ahead of less-urgent jobs without canceling and resubmitting.
The reason this matters past simple visibility is that the Flex Queue is finite - 100 jobs max. An org that submits batch jobs faster than they execute will eventually hit that ceiling, and new submissions will fail rather than queue. Watch the page during periods of heavy batch activity (end-of-month aggregations, mass imports, scheduled cleanups), and design batch architectures with the concurrency limit and queue depth in mind from the start.
How to set up Apex Flex Queue
Apex Flex Queue is the read-only management page for batch Apex jobs waiting to start — Salesforce processes 5 batch jobs concurrently per org, and any beyond that wait in Holding status in the Flex Queue (up to 100 jobs). Admins can reorder the queue to prioritize critical jobs.
- Open Setup → Apex Flex Queue
Setup gear → Quick Find: Apex Flex Queue → Apex Flex Queue.
- Review jobs in Holding status
Each row: Job ID, Apex Class, Submitted Date, Position in Queue.
- Reorder by clicking Move to Front / Move to Back
Higher-priority jobs to the front. Salesforce takes from position 1 when a slot frees.
- For job abort: click Abort on Holding jobs
Aborts before the job starts. Once a job moves out of Holding into Processing, abort happens via Apex Jobs page instead.
- Monitor concurrent execution via Apex Jobs
Setup → Apex Jobs shows in-flight batch jobs (Status = Processing). Flex Queue is the waiting room.
Reorder priority of jobs in Holding.
Cancel a Holding job before it starts.
Read-only column showing current ordering.
- 5 concurrent batch jobs is a hard org-wide limit. Submitting 6+ jobs queues the extras in Holding — they wait for a slot to free.
- 100 jobs max in the Flex Queue. Submitting a 101st batch fails with a System.AsyncException — your code must handle this case.
- Reordering only affects Holding jobs. Once a job starts (Processing status), it can't be paused or reordered — it runs to completion or abort.
How organizations use Apex Flex Queue
End-of-month batch jobs queue up in the Flex Queue; admins reorder them so the financial reconciliation runs before downstream reports that depend on it.
Migration team monitors Flex Queue depth during big data loads; when queue length grows past 50, the team throttles incoming integrations to prevent the 100-job ceiling.
Operations team uses Flex Queue ordering during incident response - pushing urgent recovery batches ahead of routine sharing recalculations.
Trust & references
Straight from the source - Salesforce's reference material on Apex Flex Queue.
- Apex Flex QueueSalesforce Help
- Monitoring the Apex Flex QueueSalesforce Help
Test your knowledge
Q1. What skill set is typically needed to work with Apex Flex Queue?
Q2. Where would a developer typically work with Apex Flex Queue?
Q3. What is a Governor Limit in the context of Apex Flex Queue?
Discussion
Loading discussion…