Loading

List of asynchronous Apex jobs as listed in SOAP API guide

Data pubblicazione: May 30, 2026
Descrizione

The AsyncApexJob object in Salesforce stores records for all asynchronous Apex jobs. The JobType field on AsyncApexJob indicates the type of asynchronous job. While common types such as Future, Batch Apex, Queueable Apex, and Scheduled Apex are well-documented, several other job types (ApexToken, TestWorker, TestRequest, BatchApexWorker, SharingRecalculation) are used internally and are less commonly understood.
This article provides a reference for all nine AsyncApexJob JobType values and what each one represents.

Risoluzione

This article describes all nine asynchronous Apex job types available in the Salesforce AsyncApexJob object.

JobTypeDescription
FutureA 'Future' method represents an asynchronous apex method annotated as an @future method. Future methods are used to execute long-running operations such as callouts to external Web services or any operation requiring its own thread and to run in its own time
SharingRecalculationA 'SharingRecalculation' job represents a Batch Apex class (class that implements Batchable interface via implements Database.Batchable) used to recalculate the Apex managed sharing for a specific custom object. A 'SharingRecalculation' can be associated with a custom object via the custom object detail page and initiated via 'Recalculate Apex Sharing'
ScheduledApexA 'ScheduledApex' job represents an asynchronous Apex class using the Schedulable interface via implements Schedulable. Using Scheduled Apex allows for the invocation of Apex classes to run at specific times when resources are available
BatchApexA 'BatchApex' job represents an asynchronous Apex class using the Batchable interface via implements Database.Batchable. Using Batch Apex allows for the asynchronous processing of a long running process on a large data volume by breaking the job into manageable chunks to be processed separately
BatchApexWorkerUsed internally by Salesforce. For each 'AsyncApexJob' record of type 'BatchApex', Apex creates for internal use an 'AsyncApexJob' record of type 'BatchApexWorker' per 10,000 records to be processed. When querying for all 'AsyncApexJob' records, we recommend that you filter out records of type 'BatchApexWorker' using the 'JobType' field to avoid returning more than one record for each 'AsyncApexJob' record of type 'BatchApex.'
TestRequestEvery time Apex test(s) are run asynchronously from the UI or from Apex code, the system creates a parent 'AsyncApexJob' with 'JobType' set as 'TestRequest'. Customers can also execute a SOQL query to check the status of overall test request
TestWorkerA 'TestWorker' job is used only internally by Salesforce, and is not saved in the database 
ApexTokenAn 'ApexToken' job is used for Flex Queue enabled organizations. From Winter '16 onwards, the flex queue is enabled by default for all organizations. If an Apex code block invokes Database.executeBatch(),instead of accepting the job directly into Salesforce's queueing system, an 'ApexToken' Job is submitted to the queue. For any batch job that a user submits, a token job is created internally. However, if the maximum number of queued batch jobs in the batch job queue has been reached, the new batch job is placed in a 'Holding' state in the flex queue. 

'ApexToken' is our internal mechanism for managing system resources. When a token job gets picked up by the system for execution, it's an indication that the system can take in more jobs from the flex queue. 

Note: Every organization has only limited number of 'ApexToken' jobs. This token mechanism allows organizations to submit more batch jobs (maximum is a 100), however only some of them could be running in parallel on the Salesforce platform. 
QueueableA 'Queueable' job represents an asynchronous Apex class using the Queueable interface via implements Queueable. Using the Queueable interface, allows users to manage and monitor asynchronous Apex jobs


Note: BatchApexWorker and TestWorker are used internally by Salesforce and are not directly invoked by customers. When querying AsyncApexJob for batch job status, filter out BatchApexWorker records to avoid duplicate entries: add WHERE JobType != 'BatchApexWorker' to your SOQL query.

Numero articolo Knowledge

000387766

 
Caricamento
Salesforce Help | Article