I have the following class which I try to schedule from the anonymous window but this gives the error:
invalid type:abc_RiskSchedulerProcessor
Class
global class abc_RiskSchedulerProcessor implements System.Schedulable {
global abc_RiskSchedulerProcessor() {
}
global void execute(System.SchedulableContext SC) {
}
}
Anonymous window
Datetime sysTime = System.now();
sysTime = sysTime.addSeconds(5);
String chron_exp = ''
+ sysTime.second() + ' '
+ sysTime.minute() + ' '
+ sysTime.hour() + ' '
+ sysTime.day() + ' '
+ sysTime.month() + ' ? ' + sysTime.year();
abc_RiskSchedulerProcessor scheduler = new abc_RiskSchedulerProcessor();
System.schedule('RiskScheduler', chron_exp, scheduler);
abc_RiskSchedulerProcessor
in your org, double check if you are running script in right org's dev console. I ran the code in dev console without creating that class; gave same error as you. – Raul Feb 19 '19 at 15:58