Activity Forums Salesforce® Discussions How can we track the status of the current running batch job?

  • Avnish Yadav

    Member
    August 10, 2018 at 6:50 am

    Hello Chanchal,

    We can track the status of the running batch job by using:-

    List<AsyncApexJob> myrunningjob = [Select Id, Status, ApexClass.Name From AsyncApexJob where ApexClassId =: yourclassid order by CreatedDate DESC limit 1];
    System.debug('@@@@@ running job status is: @@@'+ myrunningjob[0].status);

    Thanks.

     

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos