-
-
Save 402332509/f3336cc8f508b0e68141d16f880558bd to your computer and use it in GitHub Desktop.
Batch Apex Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Title | |
* | |
* @author | |
* @version 1.0 | |
* @description | |
* @uses | |
* @history | |
* yyyy-mm-dd : | |
*/ | |
public without sharing class MyBatch implements Database.Batchable<sObject>, Database.Stateful, Schedulable, Database.AllowsCallouts { | |
public Iterable<sObject> start(Database.BatchableContext bc) { | |
return Database.getQueryLocator([Select Id From XXXX ...]); | |
} | |
public void execute(Database.BatchableContext bc, List<SObject> scope) { | |
for(SObject obj : scope){ | |
} | |
} | |
public void finish (Database.BatchableContext bc) { | |
} | |
public void execute(SchedulableContext SC) { | |
Database.executeBatch(new MyBatch(), 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment