1

Is there a way I can tell what the 'Maximum number of batch apex jobs queued or active concurrently' limit is in our org? Usually it is 5 (Refer to Page 3 in this document), but I believe our org has it at 8 (we most certainly had at least 6 concurrent jobs run in the recent past). Recently we requested Salesforce Support to increase this limit temporarily so we can run some weekend jobs quicker, which they approved to 15 just for those 2 days. They approved it ahead of time, but I am not sure if they really clicked the button yet. So the broader question is, how can I tell what the exact limit is in our org at this point in time? Be it via the UI or via apex. I just don't want to end up with Attempted to schedule too many concurrent batch jobs in this org error.

The Limits Class came to mind, but doesn't look like this specific limit has a getter method.

2

Not elegant, but you could write a class that schedules a trivial job many times (e.g. 20 for your situation) and count the AsyncApexJob rows that have a Status of other than "Holding". The results won't necessarily be exact but should give a reasonable indication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.