Skip to main content TDX, the developer conference for the AI agent era is happening now. Watch live on Salesforce+ for exclusive digital content, a revolutionary keynote, and more.
You have exceeded the maximum number (100) of Apex scheduled jobs.

Hi, Is there any workaround to overcome the above governor limit?
1 answer
  1. Oct 7, 2019, 12:44 PM
    Hi Bhagyashree,

    You can create schedulable class (not a batch, not a future) and that class would invoke two batch jobs one after the other one. This would mean you are scheduling only one class, but you are able to run two batch jobs at the same time.

    Note:- The batch jobs would run one after another. The second batch job would start, once the first one is finished.

    A sample Apex snippet is below:-

    //declaration of scheduler class

    global class ScheduleMultipleBatchJobs implements schedulable

        {

        //method to implement Apex schedulers

        global void execute(SchedulableContext ct)

            {

                BatchDeletion BD = new BatchDeletion();

                Database.executebatch(BD);

                UpdateAccountFields UP = new UpdateAccountFields();

                Database.executebatch(UP);

            }

        }In the above example we are invoking two batch jobs (BatchDeletion & UpdateAccountFields) with one schedulable class (ScheduleMultipleBatchJobs).

    Thank You,

    www.nubeselite.com

    Development | Training | Consulting

    Please mark this as solution if your problem is solved.
0/9000