function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prakashedlprakashedl 

Error Deleting Scheduled Jobs from CronTrigger

I have two questions around apex scheduler Jobs. Any help would be very useful

 

a) Why scheduled jobs that are in "COMPLETED" or "DELETED" state show up in Monitoring-->Scheduled Jobs and count towards the limit of 10 scheduled jobs. Any thoughts to get around this?

 

b) I am trying to delete jobs in CronTrigger table. I am getting the following error message the job still remains in the list of scheduled jobs. However, if i manually delete by going to Monitoring-->Scheduled Jobs in the org, it works. Any idea why I am getting the below exception? Suggestion to resolve this would be very useful.

 

java.sql.SQLException: ORA-20001:
ORA-06512: at "DOC.CMETAACCESS", line 542
ORA-01403: no data found
ORA-06512: at "DOC.CMETAACCESS", line 706
ORA-06512: at "DOC.CMETAACCESS", line 694
ORA-06512: at "DOC.CMETAACCESS", line 663
ORA-06512: at "DOC.CMETAACCESS", line 641
ORA-06512: at "DOC.UDDDMLCRONTRIGGER", line 65
ORA-06512: at line 1
: {call UddDmlCronTrigger.get_detail(?,?,?)}

sfdcKevinCsfdcKevinC

a) That's a bug that has been fixed in the Winter '11 release. If I remember correctly, running System.abortJob() on completed / deleted jobs will prevent those jobs from counting towards the limit.

 

b) Another bug which is being investigated. The timeframe for the fix is unknown. You open a case with support and they can manually fix this for your org.