How Apex jobs runs in salesforce.
Suppose i have 11 users and if they submit batch class to run how salesforce accept there request. If they are submitted at same time and how salesforce maintain queue.
Salesforce can have more then 5 jobs in process+queue+preparing????
Attribution to: Bhaskar Arora
Possible Suggestion/Solution #1
Batches can't be queuing (querying for records and getting the query locator ready and whatever else is in there start portion) at the same time.
So in your example, the first request in will queue, and then start it's execute method, and the the next batch in line will start its start method.
They can all be processing concurrently, but only one start method can go at a time.
They become an async job with a status. You can see apex jobs and their start time and status in the setup part of salesforce.
And yes, the first 5 in will run, everyone else will get a limits error.
Attribution to: Shane McLaughlin
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31399