You need to sign in to do that
Don't have an account?
![Knowledgeseeker Knowledgeseeker](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
I'm getting too many DML Statements 151 error when trying to execute this code in the Developer Console...
for (CronTrigger cjob : [SELECT Id FROM CronTrigger WHERE CronJobDetail.JobType != '7'AND CronJobDetail.JobType != '4' AND CronJobDetail.JobType != '9']){System.abortJob(cjob .Id);
}
}
![Knowledgeseeker Knowledgeseeker](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
This is supposed to Unschedule/remove scheduled Reports / Dashboards etc.
I would assume that you have more than 100 things that are being aborted. Presumably this is what is causing the DML error. You might try limiting your query to 100 items and see if that solves the error, then run your code multiple times as needed to clear up the jobs.