[SalesForce] What happens to a Scheduled Job if the Apex Flex Queue is full

Given that the limit on the Apex Flex Queue is 100, what happens when it is time for the system to execute a Scheduled Job (of a Database.Batchable), but the Apex Flex Queue is maxed out at 100? Is there some platform magic that will make certain the scheduled job is run when resources are available, or does the Scheduled Job simply fail? This does not seem to be documented.

Thank you.

Best Answer

If the job does not call a batch job, it will run normally (assuming resources are available); it may run later than specified, but it will still run. If the scheduleable class calls asynchronous code, then it will fail, so your scheduled job would need to try later. This is now a catchable exception, so you could choose to reschedule earlier than usual if you want a chance to run your batch again after a few minutes.

Related Topic