Suppose you have a batch class with name BatchTest.. Now you want to use that in schedule class then here is the code :
global class scheduledBatchable implements Schedulable{
global void execute(SchedulableContext sc) {
BatchTest b = new BatchTest();
database.executebatch(b);
}
}
Suppose you have a batch class with name BatchTest.. Now you want to use that in schedule class then here is the code :
Also to get complete detail, please visit :
Batch Apex : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
Schedule Class : http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_scheduler.htm
Thanks
Ankit Arora
Blog | Facebook | Blog Page