our client notified us that a scheduled job ran on the 15th December 2017 and it took longer than expected. Checking the processed jobs and their submitted dates, I couldn't find any job running on the 15th December, although the job has been scheduled for running daily. It shows that it ran from 28th December.

How can I check, for example via a SOQL query, if the APEX job really ran on the 15th December and how long it took to run?.

I would appreciate any help here.

1 Answer 1


If you want to check details I would go to Salesforce Job Monitoring UI because the code doesn't have access to much details.

If you still want to go with a code you can check next execution time, previous execution time querying CronTrigger:

CronJobDetail jobDetail = [SELECT Id, Name, JobType FROM CronJobDetail WHERE Id = :'JobDetailId'];

You can find useful information at:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy