SalesforceBlue

Feel the rhythm of Salesforce

Apex

Salesforce Apex Flex Queue

In general, a Batch Job that has not started yet will default the status of Queued. The batch which is currently being processed will be in the InProgress status. Batch jobs usually have a limit of five queued or active jobs simultaneously. 

With Flex Queues, any jobs that are submitted for execution but are not processed immediately by the system go into holding status and are placed in a separate queue (the Apex flex queue).

Up to 100 batch jobs can be in the holding status. When system resources become available, the system picks up jobs from the Apex flex queue and moves them to the batch job queue. 

The status of these moved jobs changes from Holding to Queued. Queued jobs get executed when the system is ready to process new jobs and they will then go to InProgress status.

Below is the description of the different statuses of a batch job:

StatusDescription
HoldingJob has been submitted and is held in the Apex flex queue until system resources become available to queue the job for processing.
QueuedJob is awaiting execution.
PreparingThe start method of the job has been invoked. This status can last a few minutes depending on the size of the batch of records.
ProcessingJob is being processed.
AbortedJob was aborted by a user.
CompletedJob completed with or without failures.
FailedJob experienced a system failure.

Thank you for visiting SalesforceBlue.com
If you have any queries feel free to write down a comment below 🙂


Leave a Reply

Your email address will not be published. Required fields are marked *