Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
Full Apex Jobs entry
How-to guide

How to use Apex Jobs for production monitoring

Apex Jobs is the first stop for any async failure investigation. Tuning monitoring on top of it is the work that turns a reactive admin role into a proactive one.

By Dipojjal Chakrabarti · Founder & Editor, Salesforce DictionaryLast updated May 19, 2026

Apex Jobs is the first stop for any async failure investigation. Tuning monitoring on top of it is the work that turns a reactive admin role into a proactive one.

  1. Open Apex Jobs

    Setup, Environments, Jobs, Apex Jobs. Filter by Status to focus on Failed or Processing depending on the question.

  2. Inspect a specific job

    Click the job to see scope size, total batches, error counts, and the most recent error message. View All Errors lists every exception across every failed batch.

  3. Query AsyncApexJob via SOQL

    Use the Developer Console or a Workbench query to pull arbitrary slices: failures by class, average elapsed time per class, queue saturation by hour.

  4. Build a dashboard

    Create a custom report type backed by AsyncApexJob and assemble a dashboard with failure trends, run-time outliers, and current queue depth.

  5. Snapshot data for long-term retention

    Schedule an Apex job that copies AsyncApexJob rows into a custom Async_Job_History object daily. Salesforce retains the source for weeks; the snapshot keeps the audit trail beyond that.

Gotchas
  • Apex Jobs retains rows for weeks, not forever. Build a snapshot pipeline if compliance requires longer-term history.
  • Completed status does not imply success. A batch can complete with failed batches inside it; check NumberOfErrors before declaring victory.
  • Cancelling a job from the page aborts the next batches but does not roll back finished batches. Plan compensating logic separately.
  • Scheduled jobs only appear in Apex Jobs after they execute. A misconfigured schedule that never fires shows zero history; check Scheduled Jobs to verify the registration.

See the full Apex Jobs entry

Apex Jobs includes the definition, worked example, deep dive, related terms, and a quiz.