Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Elastic Limits for Asynchronous Apex Jobs (Beta)
Elastic Limits Overview
If you turn on the “Use elastic limits for asynchronous Apex jobs (Beta)” setting, you can enqueue Queueable Apex, Batch Apex, and future methods up to an increased elastic asynchronous job limit. This elastic limit is the org’s rolling 24-hour asynchronous job limit plus either the org’s licensed rolling 24-hour asynchronous job limit (defined as 250,000 jobs or 200 times the number of applicable user licenses, whichever is greater) or 2 million jobs, whichever is less.
In other words, the DailyAsyncApexElasticExecutions limit is calculated according to this formula:
1// DailyAsyncApexElasticExecutions limit calculation (pseudocode)
2 DailyAsyncApexElasticExecutions = DailyAsyncApexExecutions + min(licensed DailyAsyncApexExecutions, 2000000)For example, if an org’s licensed rolling 24-hour asynchronous job limit is 250,000, then the org’s elastic limit is 500,000 jobs (250,000 + 250,000). However, if an org’s licensed rolling 24-hour asynchronous job limit is 12 million, then the org’s elastic limit is 14 million jobs (12 million + 2 million).
If an org reaches both the rolling 24-hour asynchronous Apex job limit and the elastic asynchronous job limit, exceptions are thrown for enqueued jobs that exceed the elastic limit.
If the number of asynchronous Apex jobs processed over a rolling 24-hour period exceeds the daily limit, Salesforce processes any additional enqueued asynchronous jobs at a throttled rate. For Batch Apex, Salesforce limits new jobs to one active job at a time and slows the processing of in-flight jobs. Processing resumes the regular, non-throttled concurrency rate only after the number of executed asynchronous jobs in the past 24 hours falls below the rolling 24-hour asynchronous job limit.
Turn on Elastic Limits
To turn on elastic limits for asynchronous Apex:
- In Setup, in the Quick Find box, enter Apex Settings, and then select Apex Settings.
- Select Use elastic limits for asynchronous Apex jobs (Beta).
- Save your changes.
To view your org’s elastic asynchronous job limit, hover over the tooltip next to the setting. If the setting is turned off, the tooltip shows the standard asynchronous job limit instead. Alternatively, you can check the org’s asynchronous job limits by using the OrgLimits class. See the Monitor Asynchronous Job Usage section.
Test Elastic Limits in Nonproduction Orgs
To test elastic processing before enabling it in production, lower the standard rolling 24-hour asynchronous Apex job limit in a nonproduction org, such as a sandbox, Developer Edition org, or scratch org. Reducing this limit forces the org into elastic processing sooner, so you can test elastic asynchronous job behavior in a safe environment.
To override the asynchronous job limit:- In Setup, in the Quick Find box, enter Apex Settings, and then select Apex Settings.
- Turn on Use elastic limits for asynchronous Apex jobs (Beta).
- Set Asynchronous Apex job limit override for nonproduction orgs to a value lower than your licensed 24-hour asynchronous Apex job limit.
- Save your changes.
This override value can’t exceed your licensed limit, and leaving the field empty causes the org to default to its licensed limit. Alternatively, you can configure this value by using the ApexSettings Metadata API type.
The override applies whether or not elastic limits are enabled. To observe elastic behavior, you must turn on the elastic limits setting and set an override that’s lower than your org's 24-hour licensed limit. When elastic limits are enabled, the elastic limit is twice the override value or the org’s licensed 24-hour asynchronous Apex job limit, whichever is lower. For example, if the licensed limit is 250,000 jobs and the override is 250 jobs, the elastic limit is 500 jobs. Conversely, if you leave the override field empty, the limit remains at 250,000 jobs, triggering standard limit exceptions rather than testing elastic behavior.
Monitor Asynchronous Job Usage
To check your asynchronous job usage against the standard and elastic limits, see the Apex Jobs page in Setup. A banner shows the number of asynchronous jobs processed in the past 24 hours, along with the org’s standard and elastic limits. It also indicates whether asynchronous processing is being throttled.

You can also use these methods on the OrgLimits class to check asynchronous job usage.
1// Map of OrgLimit instances
2Map<String,System.OrgLimit> limitsMap = OrgLimits.getMap();
3
4// Daily Limit Methods
5System.OrgLimit asyncApexDailyLimit = limitsMap.get('DailyAsyncApexExecutions');
6System.debug('Limit Name: ' + asyncApexDailyLimit.getName());
7
8// The total async jobs enqueued in the past 24 hours.
9// Gives the same value as asyncApexElasticLimit.getValue()
10System.debug('Usage Value: ' + asyncApexDailyLimit.getValue());
11
12// The daily async job limit
13 System.debug('Maximum Limit: ' + asyncApexDailyLimit.getLimit());
14
15// -------------------------------------------------
16
17// Elastic Limit Methods
18System.OrgLimit asyncApexElasticLimit = limitsMap.get('DailyAsyncApexElasticExecutions');
19System.debug('Limit Name: ' + asyncApexElasticLimit.getName());
20
21// The total async jobs enqueued in the past 24 hours.
22// Gives the same value as the asyncApexDailyLimit.getValue()
23System.debug('Usage Value: ' + asyncApexElasticLimit.getValue());
24
25// The sum of the daily limit and the additional jobs allowed up to the elastic limit
26System.debug('Maximum Limit: ' + asyncApexElasticLimit.getLimit());For example, let’s say an org’s rolling 24-hour limit is 400,000 asynchronous jobs, and it enqueues 700,000 asynchronous jobs within a 24-hour period. Here’s the org’s DailyAsyncApexExecutions and DailyAsyncApexElasticExecutions OrgLimits instance values.
1// Example Org Limits for Async Jobs
2
3// Daily Limit Methods
4Limit Name: DailyAsyncApexExecutions
5Usage Value: 700000
6Maximum Limit: 400000
7
8// Elastic Limit Methods
9Limit Name: DailyAsyncApexElasticExecutions
10Usage Value: 700000
11Maximum Limit: 800000When you use the OrgLimits class, keep these considerations in mind.
- If the “Use elastic limits for asynchronous Apex jobs (Beta)” setting isn’t enabled, the OrgLimits.getMap() method doesn’t return a DailyAsyncApexElasticExecutions key-value pair.
- The getValue() method returns the total number of asynchronous jobs enqueued over the last 24 hours, not the number executed. Because asynchronous jobs are throttled only when actual executions exceed the rolling 24-hour limit, the enqueued jobs count may surpass the rolling 24-hour limit when asynchronous jobs are still being processed at the regular concurrency rate.