Loading
Salesforce now sends email only from verified domains. Read More
Enhance Salesforce with Code
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Monitor the Apex Job Queue

          Monitor the Apex Job Queue

          The Apex Jobs Setup page has information about Apex jobs, including the percentage of async Apex usage and the number of Apex operations that have been used out of the 24-hour org limit. Monitor the status of Apex jobs to mitigate potential limit problems before they happen.

          Required Editions

          Available in: Salesforce Classic (not available in all orgs) and Lightning Experience
          Available in: Enterprise, Performance, Unlimited, Developer, and Database.com Editions

          The Apex job queue lists Apex jobs that have been submitted for execution in the past seven days. If you want to see Apex jobs older than seven days, use the All Scheduled Jobs page for scheduled jobs or access them programmatically via AsyncApexJob. Jobs that have completed execution are listed, as well as jobs that aren’t yet finished, including:

          • Apex methods with the future annotation that haven’t yet been executed. Such jobs are listed as Future in the Job Type column, and don’t have values in the Total Batches or Batches Processed columns.
          • Apex classes that implement the Queueable interface that haven’t yet been executed. Such jobs are listed as Future in the Job Type column, and don’t have values in the Total Batches or Batches Processed columns.
          • Scheduled Apex jobs that haven’t yet finished executing.
            • Such jobs are listed as Scheduled Apex in the Job Type column, don’t have values in the Total Batches or Batches Processed columns, and always have a Queued status.
            • Scheduled jobs can’t be aborted from this page; use the All Scheduled Jobs page to manage or delete scheduled jobs.
            • Even though a scheduled job appears on both the Apex Jobs and All Scheduled Jobs pages, it counts only one time against the asynchronous Apex execution limit.
          • Apex sharing recalculation batch jobs that haven’t yet finished execution. Such jobs are listed as Sharing Recalculation in the Job Type column. The records in a sharing recalculation job are automatically split into batches. The Total Batches column lists the total number of batches for the job. The Batches Processed column lists the number of batches that have already been processed.
          • Batch Apex jobs that haven’t yet finished execution. Such jobs are listed as Batch Apex in the Job Type column. The records in a batch Apex job are automatically split into batches. The Total Batches column lists the total number of batches for the job. The Batches Processed column lists the number of batches that have already been processed.
          Note
          Note Sharing recalculation batch jobs are currently available through a limited release program. For information on enabling Apex sharing recalculation batch jobs for your organization, contact Salesforce.

          This table lists all the possible job status values. The Status column lists the status of the job. The possible values are:

          Status Description
          Queued The job is awaiting execution.
          Preparing The start method of the job has been invoked. This status can last a few minutes depending on the size of the batch of records.
          Processing The job is being processed.
          Aborted The job was aborted by a user.
          Completed The job completed with or without failure.
          Failed The job experienced a system failure.

          Batch Apex jobs can also have a status of Holding when held in the Apex flex queue. See Monitoring the Apex Flex Queue.

          If one or more errors occur during batch processing, the Status Details column gives a short description of the first error. A more detailed description of that error, along with any subsequent errors, is emailed to the last user who modified the batch class.

          On the Apex Jobs page, the number in the Total Batches column can be incorrect when a large batch job is processing. To see all Apex batch classes and an accurate count of batch jobs, click the link at the top of the page to go to the batch jobs page. Click More Info on a particular batch class to show the parent jobs of the batch class, including information about:

          • Status
          • Submitted and completion dates
          • Elapsed time for each batch
          • Number of processed batches
          • Number of failed batches

          To show a filtered list of items, select a predefined list from the View dropdown list, or click Create New View to define your own custom views. Filtered views are especially useful if you want to view only future methods.

          Only one batch Apex job's start method can run at a time in an org. Batch jobs that haven't started yet remain in the queue until they're started. This limit doesn’t cause any batch job to fail and execute methods of batch Apex jobs still run in parallel if more than one job is running.

          For any type of Apex job, you can click Abort Job in the Action column to stop all processing for that job.

          All batch jobs that have completed execution are removed from the batch queue list seven days after completion.

          For more information about Apex, see the Lightning Platform Apex Code Developer's Guide.

           
          Loading
          Salesforce Help | Article