You need to sign in to do that
Don't have an account?

System.AsyncException: You have exceeded the maximum number (5) of Apex scheduled jobs
Hi All,
I had scheduled around 22 Jobs till last Friday on on SF Org with different schedules. All these 22 jobs were visible in Scheduled Jobs Tab. Starting from this Monday(16th Feb 2015) I'm getting an Error : System.AsyncException: You have exceeded the maximum number (5) of Apex scheduled jobs when I try to schedule the same number of Jobs.
Its allowing only 5 Jobs to be submitted.
Org might have been upgraded to Spring 2015 over the weekend. As per the Spring 2015 notes, we can use Apex Flex Queues to shcedule upto 100 Apex Jobs. We tried activating the Apex Flex Queue from Critical Updates section, but still the issue persists.
Need advise on what can be done to get the limit back to 100.
I had scheduled around 22 Jobs till last Friday on on SF Org with different schedules. All these 22 jobs were visible in Scheduled Jobs Tab. Starting from this Monday(16th Feb 2015) I'm getting an Error : System.AsyncException: You have exceeded the maximum number (5) of Apex scheduled jobs when I try to schedule the same number of Jobs.
Its allowing only 5 Jobs to be submitted.
Org might have been upgraded to Spring 2015 over the weekend. As per the Spring 2015 notes, we can use Apex Flex Queues to shcedule upto 100 Apex Jobs. We tried activating the Apex Flex Queue from Critical Updates section, but still the issue persists.
Need advise on what can be done to get the limit back to 100.
Couple of my colleagues have faced the same problem on different projects / orgs.
Does anybody know a workaround for this surprising limit?
As per the below link, the issue should have been resolved with FlexQueue.
https://developer.salesforce.com/releases/release/Spring15/FlexQueue
Not sure if it will get resolved by activating the Apex Flex Queue from Critical Updates or we have to contact SF to activate that.
Actually, I found Flex Queue among critical updates on my org, but after activation this feature problem still occurs.
Guys, I will try find out the reason of this problem through Partner Portal.
@Yury Bondarau- We are worried about the Scheduled Apex Jobs limit. It was 100 till last Friday. It has changed to 5 starting from this Monday.
Read through Apex Flex Queue, It puts batch jobs in holding state, not scheduled jobs.
we also started facing this issue since org's have been updated with Spring'15 however we are not facing this issue in sandbox.
The Apex Flex Queue pilot enables you to submit batch jobs beyond the allowed limit of five queued or active jobs. Any jobs that are submitted for execution but aren’t processed immediately by the system are in holding status and are placed in a separate queue (the Apex flex queue). Up to 100 batch jobs can be in the holding status. When system resources become available, the system picks up jobs from the Apex flex queue and moves them to the batch job queue. The status of these moved jobs changes from Holding to Queued. Queued jobs get executed when the system is ready to process new jobs.
Without administrator intervention, jobs are processed first-in first-out—in the order in which they’re submitted. Administrators can modify the order of jobs that are held in the Apex flex queue to control when they get processed by the system. For example, you can move a batch job up to the first position in the holding queue so that it is the first job that gets processed when the system fetches the next held job from the flex queue.
Links: https://developer.salesforce.com/blogs/engineering/2014/05/flex-batch-apex-muscles-flexqueue.html
https://help.salesforce.com/apex/HTViewHelpDoc?id=code_apex_flex_queue.htm&language=en_US
http://purushottambhaigade.wordpress.com/2014/08/01/apex-flexqueue-muscles-apex-batch-processing/
Do you know any workaround for new limit for SCHEDULED jobs (NOT a BATCH jobs)?
- you can have up to 100 Scheduled Apex Jobs, scheduled for execution at their specified time as per a cron expression.
This is broken post Spring'15; even though you are entitled to set up more jobs if you have fewer than 100, you've lost the ability to schedule any new ones. If you delete an existing job, you can't put it back either. I think this is going to have a lot of impact on time-sensitive customer integrations/processes so I hope the functionality can be restored asap.
Enabling the Flex Queue critical update doesn't fix it.
Appreciate your help on this sandeep@salesforce
Apex Flex Queue is of no help if you need to have your batches to run at different time.
Thanks for the Update.
we have got several batch which need to be run hourly, some every 4 hours. And we even have batches which schedules other batches. These batches update records that can later be used in other batches.
My problem is that we can't schedule more than 5 batches and it will have an impact if this problem goes on production environments.
On top of that, you can't test how this would look in production without a priori knowledge of how many jobs will be already scheduled by your worst-case-scenario subscriber.
Wonder if this signals that they may be thinking of this limit in roadmap.
https://success.salesforce.com/issues_view?id=a1p300000008Y2RAAU
Please click 'This issue affects me' in case you would like to be notified about the problem status.