+ Start a Discussion
Daniel KDaniel K 

Attempted to schedule too many concurrent batch jobs in this org - would it occur here ?

Hi All,
          I just want to understand if "Attempt to schedule too many concurrent batch jobs in this org" occurs in below scenario ?

          Let's say I have 2 schedulable batch jobs schedulbatch1 and scheulbatch2.
          Schedulebatch1 has 10 batch apex jobs and schedulebatch2 has 2 batch apex jobs.

          I will schedule schedulablebatch1 at 12 AM and schedulable batch2 at 1AM.
          During execution of schedulablebatch1, any chances that I get this error ? 
          Or,iff schedulablebatch1 is not finished before 1 AM and schedulablebatch2 starts execution will I get this error ?
         I read that at a time not more than 5 batch apex jobs can be processed.
           global class schedulebat implements schedulablebatch1 {
                global void execute (schedulablecontext sc){
                   batchapex1 bat1 = new batchapex1();

                   batchapex2 bat2 = new batchapex2();

                   batchapex3 bat3 = new batchapex3();

                   batchapex4 bat4 = new batchapex4();

                   batchapex5 bat5 = new batchapex5();

                   batchapex6 bat6 = new batchapex6();

                   batchapex7 bat7 = new batchapex7();

                   batchapex8 bat8 = new batchapex8();

                   batchapex9 bat9 = new batchapex9();

                   batchapex10 bat10 = new batchapex10();
vinod ram 9vinod ram 9
Hi Denial,

We have Force.com Platform Apex Limits for Batch apex execution, 

Maximum number of batch Apex job START method concurrent executions - 1
Maximum number of batch Apex jobs queued or active concurrently - 5 

Answer to your question on schedulablebatch1 and schedulablebatch2 excutions you won't get any error unless if there is any concurrent START method excutions, which is always depends on the batch size I believe.

Governar limits reference: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm