abort currently running job in Salesforce

  • Is there a way to abort currently running batch job in Salesforce? I tried to run the query below and all it did was remove all jobs from Scheduled Jobs section without stopping the one that is currently running in the background. Please help. I would like to do it without contacting Salesforce support

        List<CronTrigger> jobsToAbort = [select Id from CronTrigger where CronJobDetail.JobType = '7'];
    for (CronTrigger job : jobsToAbort) { System.abortJob(job.Id); }
  • user569925

    user569925 Correct answer

    5 years ago

    Went to SetUp --> Monitoring --> Apex Jobs. There was Abort option :)

    The navigation may have changed since this answer was written, but the page still exists here: `Setup -> Monitoring -> Jobs -> Scheduled Jobs`

    New path is : Setup > Jobs > Apex Jobs or Setup > Jobs > Scheduled Jobs

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM