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

Completed Scheduled Jobs count against the limits?



I have a process that automatically builds a scheduled job a few minutes in the future every time it fires.  This works great, but after there are ten such jobs, I get an Apex limit exception: You have exceeded the maximum number (10) of Apex scheduled jobs.


These jobs are all completed and I did check to make sure they have a status of 'COMPLETED' as well.  When I delete them by going in through the UI, then the process works again.


1. Is this intended behavior? 


2. Is there any way to programatically delete these old completed jobs?

Message Edited by jhartfield on 02-12-2010 02:35 PM
Message Edited by jhartfield on 02-12-2010 02:35 PM

 Hi support! I have the same problem with ApexJob limits, but one week ago I didn't have this problem. Such limits have not been described in the documentation. Please help us!


I am also facing this problem. plz help me asap.


An approach we are looking at is to use the system.abortjob method to removed completed scheduled jobs that have no next run and status = deleted in the CronTrigger sObject.




Anyone have an answer to this?