How To Execute Batch Class In Apex?
Now, To execute the batch class, we need to use Database.executeBatch() method.
Below is the example code to execute the batch class in Apex.
// Create object of Batch Class LeadUpdateBatch lUBatch = new LeadUpdateBatch(); // execute batch with chunk size 200 Database.executeBatch(lUBatch, 200);
Check out the video to understand and know how to write code in order to execute the batch class in Apex.