5

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 1

8

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];

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .