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
College ManagementCollege Management 

You have exceeded the maximum number (100) of Apex scheduled jobs.

Hi , Is there any workaround to overcome the above governor limit without aborting the job.
ShashankShashank (Salesforce Developers) 
Here's a workaround I found somewhere, but never tried it myself:

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).


There is also this new feature coming up, presently in pilot, to help with this: https://developer.salesforce.com/blogs/engineering/2014/05/flex-batch-apex-muscles-flexqueue.html
College ManagementCollege Management
Thanks Shashank for ur response.  
While creating a record, job must be scheduled but, If i schedule more than 100 jobs (i.e., create more than 100 records manually) of type schedule apex i am getting You have exceeded the maximum number (100) of Apex scheduled jobs. In this case scheduling itself is a problem . And i've gone through the concept flexiqueue but it is not available in current version.
 
sunil g21sunil g21
Hi Folks,

Any luck on this?