Skip to main content
Roger Wicki (Architonic AG) ha fatto una domanda in #Apex
Dear Community

I have been using a Class which handles monthly Apex jobs for quite some time but recently, I added in a new Job to execute within the Schedulable class. Since then, I can no longer schedule that class. The error message says that the class needs to have the Schedulable Interface.

Schedule Apex Interface not found error

Of course, the class still has the Schedulable Interface (otherwise it wouldn't even show up in the lookup window above):

global class ApexMonthlyJobs implements Schedulable

{

/**

Execute is called when the scheduled time for this class arrives.

All Classes which have to be executed daily can be initialized and run here

*/

global void execute(SchedulableContext sc)

{

System.debug(LoggingLevel.ERROR, 'ApexMonthlyJobs started');

// Only execute at the start of every year

if ( system.today().month() == 1 || Test.isRunningTest() )

{

PersonelReminder pr = new PersonelReminder(PersonelReminder.ReminderType.JUBILEE_DATE);

pr.remind();

PricebookCloner pc = new PricebookCloner();

pc.clonePB();

}

}

}

Is there anything I can do to fix that?

Thanks in advance
2 risposte
  1. 8 ott 2015, 05:52
    I probably would. I was fed up with trying so that I copied my code, deleted the class in sandbox & production and created a new one in the sandbox which I proceeded to push to production. Worked like a charm...
0/9000