You need to sign in to do that
Don't have an account?
Alan_Ruan
schedule apex didn't run?
Dear Experts,
I have a schedule job working fine in Sandbox but not in production. Would you please help to take a look and advise?
I have a schedule job working fine in Sandbox but not in production. Would you please help to take a look and advise?
global class rm_ScheduledDeleteInvalidLead Implements Schedulable { global void execute(SchedulableContext sc) { massDeleteLead(); } public void massDeleteLead() { List <lead> leadtoDelete = [Select Id FROM lead WHERE Firstname = 'Unknown' and Lastname = 't.b.d.' and (email = 'unknown@example.com' or email = '') and CreatedDate < LAST_N_DAYS:30]; delete leadtoDelete; } }
1. Make sure you have schedule same class on production.
2. To schedule class refer following link.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm
3. Steps to check your schedule class
Setting ► in Scheduled Jobs
4. Except above, if you are getting any error then please share.
Let us know if it helps you.
Regards,
Yogesh More