function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
srinu jsrinu j 

Batch class program..

global class AbcBatchClass implements Database.Batchable<Book__c> {
    global Iterable<Book__c>  start(Database.BatchableContext BC){
        list<book__c> bb=new list<book__c>();
        bb=[select name, price__c from book__c];
  //      FutureABC.futureMethods();
        return bb;
     //   return Database.getQueryLocator('select name, price__c from book__c');
    }
    global void execute(Database.BatchableContext bc, list<book__c> book){
 //   FutureABC.futureMethode();
 Account a=new Account();
    a.name='FUTURE e RECORD';
    insert a;
    }
    global void finish(Database.BatchableContext bc){
  //  FutureABC.futureMethodf();
      Database.executeBatch( new AbcBatchClass());
    }

}
Hi friends, I wrote the above program and executed. It is executing till now. I have tried to stop it in monitor>apex jobs> abort job. But it was not working. Can anyone say how to stop it. How to avoid recursive Batch execution ?
Amit Chaudhary 8Amit Chaudhary 8
Try this Apex code in Developer Console Execute Anonymous
for (CronTrigger ct : [SELECT Id FROM CronTrigger]) {
    System.abortJob(ct.Id);
}
I hope that will help you.

Please let us know if that will help u