global class Scheduleclass implements schedulable{
//String cronExp = '0 5 * * * ?';
//Scheduleclass s = new Scheduleclass();
//String jobID = system.schedule('Scheduleclass JOB', cronExp, s);
global void execute(schedulableContext sc){
Batchclass b = new Batchclass();
DataBase.executeBatch(b, 100);
system.debug('b----' +b);
}
}
Execution:-
------------
system.schedule('Scheduleclass JOB', '0 8 * * * ?', new Scheduleclass());
* This Schedule job will execute every one hour by default.(Suppose today at 06h:08Mins it's executed next schedule will be 07h:08mins... like this it will be schedule)
//String cronExp = '0 5 * * * ?';
//Scheduleclass s = new Scheduleclass();
//String jobID = system.schedule('Scheduleclass JOB', cronExp, s);
global void execute(schedulableContext sc){
Batchclass b = new Batchclass();
DataBase.executeBatch(b, 100);
system.debug('b----' +b);
}
}
Execution:-
------------
system.schedule('Scheduleclass JOB', '0 8 * * * ?', new Scheduleclass());
* This Schedule job will execute every one hour by default.(Suppose today at 06h:08Mins it's executed next schedule will be 07h:08mins... like this it will be schedule)
No comments:
Post a Comment