String batchClassName = 'batchName'; // 중단하려는 배치 클래스 이름 List jobsToAbort = [SELECT Id FROM AsyncApexJob WHERE JobType = 'BatchApex' AND Status IN ('Processing', 'Preparing') AND ApexClass.Name = :batchClassName]; for (AsyncApexJob job : jobsToAbort) { System.abortJob(job.Id); }