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
anna425912anna425912 

"Schedule class has jobs pending or in progress" error - Need Salesforce to "run scrutiny".

I have an old scheduled class that I need to delete and some related classes to edit.  They currently get this error because there are over 1 million cron jobs with status = "deleted". Unfortunately I haven't found a way to delete all those classes without taking a long time.  In the past, Salesforce support will just "run the scrutiny" on the sandboxes or production environment to fix this. The customer support rep directed me here because they won't address it.  I plan to delete delete these old classes since our new scheduled classes are written to be editable.  Is there someone from Salesforce that can "run the scrutiny" so that I can delete these classes? 
ShashankShashank (Salesforce Developers) 
Hi,

If you are still facing this issue, please follow the steps in this article and let me know if you are still facing the issue: https://help.salesforce.com/apex/HTViewSolution?urlname=Why-can-t-I-edit-classes-used-in-a-scheduled-class-1327108655793aa&language=en_US

If you still face the issue after followinng the steps, please let me know here or email me at ssrivatsavaya@salesforce.com

Thanks,
Shashank
anna425912anna425912
Hi Shashank, 

I was able to delete the old scheduled class once I found the "Allow deployments of components when corresponding Apex jobs are pending or in progress" setting, which I didn't know about before.  Unfortunately I couldn't run the script to abort scheduled jobs because we have over a million.  Thanks!

Anna