Activity Forums Salesforce® Discussions How to suspend a batch job?

  • Ajit

    Member
    April 25, 2016 at 7:25 am

    Hi Hazel

    There are two ways that you can suspend a batch job.

    1. go to setup > Search apex jobs and click abort on the desired batch job

    2.

    for(CronTrigger ct : [SELECT Id, CronJobDetail.Name, CronJobDetail.JobType
    FROM CronTrigger
    WHERE CronJobDetail.Name like 'Work Order%']){

    // abort the job, try/catch because the job might not exist
    // if it's being aborted manually or from another execution
    try{
    system.abortJob(ct.id);
    } catch (exception e) {}
    }

Log In to reply.

Popular Salesforce Blogs

Salesforce Marketing Cloud Integration with Google Analytics 360

Redefining the future of Marketing – Salesforce Marketing Cloud Integration with Google Analytics 360

Blog in

Know your customers better and make smarter, insight-based marketing decisions through Salesforce’s massive customer relationship management platform twinned with Google Analytics 360’s market-leading digital analytics solution…

Popular Salesforce Videos