Skip to main content

Posts

Showing posts from October, 2019

Different ways to schedule Batch Class

1.       Write a schedulable class for your Batch class. ·          Lets us assume my batch class name is SFDC_ExecuteAccountBatch. ·          To schedule it we need to create a new class and implement a schedulable interface ·          Syntax: global with sharing class  SFDC _ExecuteAccountBatchScheduler implements Schedulable {     global void execute(SchedulableContext sc) {                   SFDC _ExecuteAccountBatch b = new  SFDC _ExecuteAccountBatch();                 database.executebatch(b);     } } 2.       Write a batch class with Schedulable interface ·      ...