0

I have a schedule apex that when I try to start it I get the message

System.AsyncException: The Apex job named "Case Rescore" is already scheduled for execution.

When I query cronJobDetail I see the job detail. Querying cronTrigger there is no job with that detail id. I have tried deleting the cronJobDetail and get INSUFFICIENT_ACCESS_OR_READONLY

I can not abort it as there is no job.

This job needs to run every 15 minutes. So after it runs it aborts the previous job and starts a new one.

I have tried the solution here Scheduled batch "already scheduled" without success.

I have considered changing the name, however it looks like this is a temporary fix.

How can I remove the existing cronJobDetail record?

  • Sandbox or Production? Unit test or using live data? – sfdcfox Jul 6 '16 at 17:37
  • This is in a full sandbox using live data. We refreshed the sandbox two weeks ago. Before that it was working fine. – Fred B Jul 7 '16 at 18:18
  • 1
    Fred, I've flagged this question as a duplicate. Please check the accepted answer for the question I've linked to (basically, you need to contact support and ask them to fix your jobs table). – sfdcfox Jul 7 '16 at 18:28

Browse other questions tagged or ask your own question.