FlexQueueItem
Represents an asynchronous Apex job in the Apex flex queue. Provides information about the job type and flex queue position of the AsyncApexJob.
Introduced in API version 36.0.
describeSObjects(), query()
- In API version 49.0 and later, users must have the View Setup and Configuration permission to access this object.
-
Type: reference
-
Properties: Filter, Group, Sort
-
Description:
The ID of an AsyncApexJob that’s waiting in the flex queue.
This is a relationship field.
-
Relationship name: AsyncApexJob
-
Relationship type: relationship
-
Refers to: AsyncApexJob
- Type: id
- Properties: Filter, Group, Nillable, Sort
- Description: The primary key for this FlexQueueItem.
- Type: int
- Properties: Filter, Group, Sort
- Description: The position in the flex queue of the waiting job. The highest-priority job in the queue is at position 0.
-
Type: picklist
-
Properties: Filter, Group, Restricted picklist, Sort
-
Description:
The type of the job.
Currently, queries are supported only on
BatchApexjobs. -
Possible values:
- ApexToken — ApexToken
- BatchApex — BatchApex
- BatchApexWorker — BatchApexWorker
- Future — Future
- Queueable — Queueable
- ScheduledApex — ScheduledApex
- SharingRecalculation — SharingRecalculation
- TestRequest — TestRequest
- TestWorker — TestWorker
To find the position of an AsyncApexJob in the flex queue, query JobPosition. For example:
To find the job at a given position, query AsyncApexJobId. For example:
To find all batch jobs in the flex queue, query JobType. To get other information about the jobs, include AsyncApexJob in your query. For example: