+ Start a Discussion
Roger WickiRoger Wicki 

Schedule Apex Interface not found error

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.

User-added image
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
Best Answer chosen by Roger Wicki
Roger WickiRoger Wicki
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...

All Answers

SonamSonam (Salesforce Developers) 
Are you still facing this issue on your org?
Roger WickiRoger Wicki
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...
This was selected as the best answer