Activity Forums Salesforce® Discussions How can we Schedule batch apex in Salesforce?

  • Hariom Chaudhary

    Member
    August 5, 2019 at 11:58 am

    How to create Apex Batch Class:

    Create an apex class which implements Database.Batchable interface and class must be globle like mentioned below.
    global class batchExample implements Database.Batchable
    {

    }

    It is used to run large jobs (think thousands or millions of records!) that would exceed normal processing limits.

    1- We can fetch 200 records in execution.
    2-The main diff between Batch apex and scheduled apex is No of Records.We can only have 100
    scheduled Apex jobs at one time, while for batch apex the limit is 200.
    3-When we want to run a piece apex code at some particular time within a period of time.Schedule
    apex is class which runs at a regular interval of time. To schedule an apex class we need to
    implement an interface Schedulable.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos