function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sandy GaliSandy Gali 

Apex Job Queue Monitoring

Hi Guys,
               Is there anyway that we can monitor the apex job queue and send an email alert when the jobs are not processed for more than 5 minutes.
We have observed that the future jobs are queued sometimes and take a long time to process.
It would be good if we can get an email alert in such scenarios.

Regards,
Sandy
Grazitti TeamGrazitti Team
Hi Sandy,
You can get the solution of this by using the "CronTrigger" salesforce standard object. 
The "CronTrigger" contains some fields that helps you to know about the Start Time, Job Status, and End time.  
Here the link of the "CronTrigger" object.
http://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_crontrigger.htm

I hope the above is useful to you.

Please Mark this as best Answer if it helps you

Regards,
Grazitti Team
Web: www.grazitti.com
Email: sfdc@grazitti.com