How to Query All the batch classes in your Salesforce Instance using APEX
You can use the following scripts to know the batch classes in your Salesforce instance. List asyncApexJobList = [select ApexClassId, Id, JobItemsProcessed, JobType, Status, NumberOfErrors, MethodName from AsyncApexJob where JobType in ('BatchApexWorker','BatchApex')]; List idList = new List (); for(AsyncApexJob eachRecord:asyncApexJobList){ idList.add(eachRecord.ApexClassId); } List apexClassList = [Select Name from ApexClass where Id IN:idList]; for(ApexClass eachApexClass : apexClassList){ System.debug(eachApexClass.Name); } Additionally, You can use above to get all schedulable and other classes by adding the JobType filter. The possible values for JobType are: Future SharingRecalculation ScheduledApex BatchApex BatchApexWorker TestRequest TestWorker ApexToken Queueable Also, you can use the above script to find the status of the job as well by adding a filter on AsyncApexJob. Type. The possible values are: Holding Queued P...