Error:
Method does not exist or incorrect signature: void schedule(String, String, BatchEmail) from the type System
I am trying to write a scheduler class which runs every 60 days. I am getting the error above when I try saving it. Not sure what the problem is.
Here is the code:
global class BatchEmails_Scheduler implements Schedulable {
public static String sc = '0 0 18 1/60 * ? *';
global static String schedule() {
BatchEmails be = new BatchEmails();
return system.schedule('Send Emails', sc, be);
}
global void execute(SchedulableContext sc) {
BatchEmails be1 = new BatchEmails();
ID batchprocessid = database.executeBatch(be1, 100);
}
}