Checking LeanData Apex Jobs

Have more questions? Submit a request

Contents:

 

What to Check if LeanData is Not Routing Records

LeanData is a native Salesforce app that operates within Salesforce through scheduled Apex jobs that run alongside your other apps and processes. Due to native Salesforce functionality, an organization can only have 5 apex jobs maximum running at a time. LeanData requires at least 2 job slots in order to schedule our apex jobs and process records. The processing time will vary based on how many other Apex jobs/processes are running within your Salesforce alongside LeanData.

If there are several other Apex Jobs running that take up all of the available Apex processing job slots, LeanData’s jobs can be temporarily deprioritized. This means that LeanData’s processing of records through matching and tagging can be delayed as the other jobs are preventing our jobs from running in a timely manner. The processing of new and updated records can be delayed until enough job slots have opened up for LeanData to resume normal processing.

If LeanData is suspected of not running, there are a few things to check that will provide further insight towards the root cause:

  • LeanData Job Status
  • Salesforce Apex Jobs
  • Number of Scheduled Apex Jobs
  • Backlogs

 

Check the LeanData Job Status

There are two places within the LeanData interface to check the LeanData Job Status

  • Open the LeanData application in Salesforce.
    • At the top of the left sidebar, you will see the current job status.
  • Alternatively, navigate to Admin > Settings > General Tab
    • In the LeanData Job Scheduler section, you will see the current LeanData Job Status

Screenshot 2025-07-08 at 12.11.55 PM.png

When checking the job status, please note that there are a few different status options that can be displayed. Please see the definitions of each below.

LeanData Job Status Values:

  • Running: This status means that LeanData is processing records normally, as expected. This is not considered a critical status as this indicates LeanData is operating smoothly.
  • Running - Delayed: LeanData is processing records, but there are backlogs. Backlogs typically occur when a large number of records are added/edited in SFDC and LeanData falls behind in the processing. This status means that LeanData jobs are 12 hours behind regular processing. Backlogs usually resolve on their own once LeanData is able to catch up in processing. Read more about backlogs in the “Check for a Backlog” section below. This status is not considered critical as the backlog will clear out in time.
  • Holding: This status means that there are 5 currently running apex jobs and LeanData needs to wait until 1 of those 5 slots becomes available. Once a slot becomes available, this status should resolve. Check out the “Check Your Salesforce Apex Jobs” section below for more information.This status is not considered a critical issue as it resolves once LeanData is able to schedule our Apex jobs and resume operations.
  • Aborted: The aborted status indicates that your salesforce instance has potentially hit the 24-hour Apex Scheduler limit of 250,000 scheduled apex jobs in a 24 hour period. As a result, LeanData was unable to schedule our Apex jobs in the queue to be processed. You can read more about these limits in the “Check the Number of Scheduled Apex Jobs” section. The aborted status is not considered critical as this should be remedied by aborting non-essential apex jobs or waiting for the 24-hour limit to reset. 
  • Failed: Please check your apex job logs for the presence of error messages, you can check the jobs per the instructions in the “Check Your Salesforce Apex Jobs” section of this document. Please then contact LeanData Support for further assistance as this status is considered critical to operations.
  • Not Running: LeanData’s jobs are not running at all. This may mean that the LeanData Scheduler  was never started in this org. Restart the LeanData scheduler by clicking “Restart Scheduler”, pictured below. This status is not considered a critical issue as this can be resolved most easily by restarting the scheduler. 

By checking the LeanData job status, we can see whether or not LeanData is operating and to what degree of efficiency.

 

Check Your Salesforce Apex Jobs

To check your Salesforce Apex jobs, you can go to your Salesforce Setup and enter “Apex Jobs” in the quick search. You can proceed to check which apex jobs are processing, queued, and in holding. If your org has a Salesforce admin, they may be able to assist further towards assessing the Apex jobs as described.

 

The two LeanData apex jobs that are most important to product functionality are:

  • LeanDataContinuousBatch: Responsible for picking up and processing records through Matching, Tagging, and Routing.
  • SchedulingMonitor: Allows the LeanDataContinuousBatch job to re-schedule as needed to continuously process records.

By checking the Apex Jobs, you can see if there are any unnecessary or non-essential Apex jobs that are processing and have deprioritized LeanData from running. If you find any non-essential jobs occupying a job slot, you can abort the job to open the slot up for another queued job. 

You can most easily evaluate your current jobs by viewing the Scheduled Jobs page in Salesforce and creating a custom view with a status filter equal to “Queued, processing, holding”. 


 

For more information around Apex Jobs please see the Salesforce articles below:

 

Check the Number of Scheduled Apex Jobs

If you have a LeanData job status of “Aborted”, please check if your org has hit the Native Salesforce 250,000 24-hour scheduled Apex job limit. You can most easily check by using the below query:

SELECT count() FROM AsyncApexJob WHERE CreatedDate >= LAST_N_DAYS:1

If this is the case, LeanData will begin to run automatically once the rolling 24-hour period has passed.

 

Check for a Backlog

LeanData can also be delayed by the presence of a backlog of records that are pending processing. This most often occurs when there is a large upload of records to an SFDC org. 

Another scenario that can cause backlogs is if there are a high number of records updated to trigger LeanData’s updated Routing or Matching. By default, LeanData will process records in batches of 400 at a time in the Apex jobs. If there is a sudden high volume of records pending processing, this can cause LeanData to be temporarily delayed. However, this is a self-resolving issue as the backlog will clear out in time and processing speed will return to normal as LeanData chips away at the backlog.

Note: There is no predefined number of records that will trigger a backlog, as there is no point where processing slows down. Processing happens at the same rate regardless of how many records are pending, so how long records will take to process is primarily driven by how many records there are to process. Routing more records will take longer than routing fewer records.

To check how many records are pending processing, you can most easily run the below query in your Salesforce Developer Console:

SELECT COUNT(Id), LeanData__Pending_Action__c FROM LeanData__CC_Inserted_Object__c GROUP BY LeanData__Pending_Action__c

This query will show you how many records are pending processing by LeanData. You can use this query to monitor whether or not the backlog clears out in time, continues to rise, or remains stagnant. If a backlog is found and continues to rise or does not clear out over time, please submit a ticket to LeanData Support  for further assistance. 



Any Questions? Submit a ticket to LeanData Support.

Articles in this section

Was this article helpful?
2 out of 2 found this helpful
Share