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

how to get all scheduled apex class in a vf page

HI i have a requirement where i have to get the list of all scheduled apex classes that are in my organization. Any help with respect to this regards will be greatly appreciated. Thanks in advance

get all the schedule apex class id like below

[Select apexclassid From AsyncApexJob a where jobtype = 'ScheduledApex'];

get the list of apexclassid from the above query //consider as classids

then get all the names from ApexClass object like below

[select name from apexclass where id in :classids];



You can fire a query on  "AsyncApexJob" sObject which provide you all information about schedule apex classes.

Query: [Select ApexClass.Name, ApexClassId From AsyncApexJob a where JobType = 'ScheduledApex' and Status = 'Queued']



Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.