Find your content:

Search form

You are here

How can I get the details of last schedulable job and of which class? Is there any way?

 
Share

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?


Attribution to: AnkushSalesforce

Possible Suggestion/Solution #1

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

Attribution to: Chris Duncombe
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34538

My Block Status

My Block Content