1 answer
Hi,You can abort the jobs which are in queue as below.
And run the apex batch again.If this solution helps, Please mark it as best answer.Thanks,List<AsyncApexJob> jobs = [SELECT Id, Status FROM AsyncApexJob WHERE Status NOT IN ('Completed', 'Failed','Aborted')];
for (AsyncApexJob job : jobs)
{
System.abortJob(job.Id);
}