+ Start a Discussion
WizradWizrad 

Batchable class has jobs pending or in progress

When I try to deploy via ant migration tool.  Have not tried any other way because I want to deploy this local copy I have, not what is on the server.

 

1) Upon error about 16 seemingly random classes are listed along with the error.  None of my code implements batchable.

2) I have pushed this same code to multiple other orgs.

3) Under Setup->Monitoring->Apex Jobs there is nothing with status other than "Completed" or "Aborted".

4) Under Setup->Monitoring->Scheduled Jobs there is nothing scheduled with type "Scheduled Apex".

5) I executed the following code in hopes of killing zombie jobs:

 

for(AsyncApexJob aaj : [SELECT Id FROM AsyncApexJob]) {
 System.abortJob(aaj.Id);
}

None of this worked.  Error on deploy.  At this point im fairly confident its an sfdc issue but maybe the community has ran into this and has some secret knowledge.

 

Thanks

Ankit AroraAnkit Arora

This is strange, I hope you have logged a case related to it.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

rocwilcoxrocwilcox

We also had this exact problem.

The solution was to check under apex test execution, and find any still running tests (that no doubt were batchable, still running from months prior), and abort them.

We could then deploy!

WizradWizrad

In my case there was just a hiccup in our org which SFDC had to resolve.