Scheduler Class
-----------------------
global class AccountBatchScheduler implements Schedulable {
// Execute at regular intervals
global void execute(SchedulableContext ctx){
RunQuery batch = new RunQuery();
Database.executebatch(batch, 200);
}
}
We can schedule job from developer console.
System.schedule('AccountBatchScheduler', '0 0 * * * ?', new AccountBatchScheduler());
-----------------------
global class AccountBatchScheduler implements Schedulable {
// Execute at regular intervals
global void execute(SchedulableContext ctx){
RunQuery batch = new RunQuery();
Database.executebatch(batch, 200);
}
}
We can schedule job from developer console.
System.schedule('AccountBatchScheduler', '0 0 * * * ?', new AccountBatchScheduler());