function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
amidstcloudamidstcloud 

More than 5 Batch Apex Issue.

When I am performing RUN ALL Test in my Org.  I m getting the below Issue. 

 

Failure Message: "System.LimitException: Attempted to schedule too many concurrent batch jobs in this org (limit is 5).", 

 

I am having a quite number of batch Apex test class.. and I am performing the Database.Execute  in the all the batch apex test class to cover the code.. Am I missing or breaking something here.. Please let me know.. thanks 

 

 

Ankit

Avidev9Avidev9
Does the org have scheduled jobs ?
If yes how many ?

Make sure from a single testmethod you cant schedule/run more than 5 batches.

Also check if you have trigger that executes the batch class.