Test Elastic Limits by Overriding the Asynchronous Apex Job Limit in Nonproduction Orgs
To test the behavior of asynchronous Apex jobs during elastic processing, override the standard 24-hour rolling asynchronous Apex job limit in a nonproduction org. A lower override value triggers elastic processing sooner, so you can see how asynchronous jobs behave before you turn on elastic limits in production.
Where: This change applies to Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions. The override applies only to nonproduction orgs, such as sandboxes, Developer Edition orgs, and scratch orgs.
Why: Previously, elastic limits were available only in production and demo orgs, which made this behavior difficult to test without exceeding your org’s standard 24-hour rolling asynchronous Apex job limit.
How: In a nonproduction org, go to the Apex Settings page in Setup and enable the “Use
elastic limits for asynchronous Apex jobs (beta)” setting. Then set the “Asynchronous Apex job
limit override for nonproduction orgs” setting to a lower value than your standard limit. Leaving
the field empty causes the org to default to the standard limit. Alternatively, you can configure
the override by using the ApexSettings Metadata API type.
In nonproduction orgs, the override value takes effect regardless of whether you turn on the elastic limits setting. If enabled, the elastic limit is either twice the override value or your org’s licensed standard limit, whichever is lower. To observe elastic behavior, you must turn on the elastic limits setting and set an override that’s lower than your org’s licensed standard limit.
For example, if your standard limit is 250,000 jobs and you set an override of 250 jobs, the elastic limit is 500 jobs. If you leave the override field empty, the limit remains at 250,000 jobs, triggering standard limit exceptions rather than testing elastic behavior.