I have seen many posts about finding out name of the apex class associated with a scheduled job. However, i have an opposite need.
I am updating a scheduled class, that was scheduled to run at a certain frequency every week. It was scheduled several years ago, so at this stage, nobody remembers the Job name.
Before i can deploy my edited class, i need to de-active the scheduled job associated with the class, otherwise deploy will fail.
So my question is, if i have a schedulable apex class xyz.cls. Is there a way to find out IF it is scheduled to run already? If yes, is there a way to find out what's the job name and whats the schedule frequency?
Best Answer
There are two things for you here:
Note, as the label itself explains, enabling this option may cause Apex jobs to fail.
AsyncApexJob
object. There propertyApexClassId
that will give you the apex class.For example, you can do: