Created
September 7, 2020 06:34
-
-
Save agentgill/a6a694408793ebb1697e760850cfb1d3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /** | |
| @description - Universal Batch Apex Scheduler | |
| @credit - https://th3silverlining.com/2014/02/02/salesforce-universal-batch-scheduling-class/ | |
| */ | |
| global class BatchScheduler implements Schedulable { | |
| global Database.Batchable<SObject> batchClass{get;set;} | |
| global Integer batchSize{get;set;} {batchSize = 200;} | |
| global void execute(SchedulableContext sc) { | |
| database.executebatch(batchClass, batchSize); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment