2

Note - Ghost Schedulable Classes Blocking Deployment and https://success.salesforce.com/issues_view?id=a1p30000000STwPAAW may be related, but I'm not sure

Someone in our org made the poor decision to create a class called "Account," which caused errors across a few classes which used the Account standard object. Initially, I tried deleting the class, but got the error:

"This Schedulable class is in use."

The code was simply this:

public class Account {
}

In order to solve the initial issue, I changed the class name to "Accountd", which resolved the name errors, but still cannot delete the class.

  • Have you tried clearing ALL batches in the org and then deleting? – Adrian Larson Jan 29 '15 at 15:56
  • @AdrianLarson Does that mean actually deleting all of them or just stopping them temporarily? – IllusiveBrian Jan 29 '15 at 16:15
2

Go Administration Setup | Monitoring | Schedule Jobs and you should see of list of currently scheduled jobs like below

Scheduled

Can you also go to Develop | Apex Classes and find the class you want to delete. Then click on it to show more details then click on the button Show Dependencies to identify where the class is referenced.

Hope it helps

  • 4
    But sometimes you won't. In those cases, contact support and they can run a script to eliminate those ghostly tasks. – sfdcfox Jan 29 '15 at 16:04
  • Unfortunately my org blocks imgur so I can't see your picture, but I would assume I am looking at the same screen. The class has no dependencies, but also I didn't think it could even be scheduled if it does not implement the scheduleable interface. I'd assume it got linked to a job due to its name, so perhaps that's the issue. – IllusiveBrian Jan 29 '15 at 16:14
0

Oddly, the problem seems to have gone away on its own, I was able to delete the class with no issues. Thanks for the help everyone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.