I am getting this error when i look at my apex jobs UI
"Scheduler: failed to execute scheduled job: jobId: 7072000002391Am, class: common.apex.async.AsyncApexJobObject, reason: Too many DML rows: 10001"
All suggestions I have seen tell me to schedule the job but it scheduled to go everyday - do I need to break it in to smaller batches still?
This is the code, any suggestions are most appreciated
global void execute (SchedulableContext sc) {
List<Contact> agentsToRemind = new list <Contact>
( [SELECT Id FROM Contact WHERE Days_since_web_registration__c > 90
AND Luxury_Agent_ID__c = NULL AND join_heroes_reminder_sent__c= NULL ]);
IF(agentsToRemind.size()>0){
update agentsToRemind;
}
}