I have a requiurement where I have to get the details of last job details and the Of which clas s. How can I get the details ? i have tried using CronJob details and CronTrigger?
1 Answer
Query for the AsyncApexJob Object. Something like this will get you started
AsyncApexJob myJob = [SELECT Id, Status, ApexClass.Name,
FROM AsyncApexJob
Order by CompletedDate DESC limit 1];