You need to sign in to do that
Don't have an account?

Can't schedule apex in UI
Hi Everyone,
I'm new to Apex and I'm trying to schedule a class that I've written. I'm going into Setup > Develop > Apex Classes and clicking on the "Schedule Apex button. When I select my class I get an error that says "You must select an Apex class that implements the Schedulable interface." The thing is, I thought I followed the develper documentation correctly in setting this up. I can't figure out why it's giving me this error. Can anyone offer some assistance? Here's my class:

Thanks for any help.
I'm new to Apex and I'm trying to schedule a class that I've written. I'm going into Setup > Develop > Apex Classes and clicking on the "Schedule Apex button. When I select my class I get an error that says "You must select an Apex class that implements the Schedulable interface." The thing is, I thought I followed the develper documentation correctly in setting this up. I can't figure out why it's giving me this error. Can anyone offer some assistance? Here's my class:
global class autoRenewalOpps Implements Schedulable { global void execute(SchedulableContext sc) { aRopps(); } public void aRopps() { //Create list of renewal opportunities to close List<Opportunity> renewalOpps = [SELECT StageName, Type FROM Opportunity WHERE RecordTypeId = '012S00000000klc' AND IsClosed = False AND Type = 'Renewal' AND CloseDate < LAST_N_WEEKS:2 AND LastActivityDate < LAST_N_WEEKS:2 ]; //Loop through opportunities changing the type and stage for (Opportunity opp : renewalOpps) { opp.type = 'Auto-Renewal'; opp.StageName = 'Closed Won'; } //Update the opportunities update renewalOpps; } }And here's the error I get when trying to schedule it:
Thanks for any help.
Maybe you can try in a different org? It's weird what is happening to you. Sorry I can't help more.
I copied this into my developer org and it worked as well. So at least I know it's not something with my code. I'll keep poking around. I wonder if the fact that it's in a sandbox has anything to do with it.