How to delete dormant Q-assign Apex Jobs from Salesforce


 

Salesforce allows up to 100 jobs to be run at one point in time. If there are over 100 jobs in an org and most of them are dormant jobs, this can cause issues. Dormant jobs are leftovers due to an issue with Salesforce where a job goes in a state where it cannot be removed from the system from the GUI. This may possibly result in Q-assign manager to start failing and hence resulting in a manual restart of Q-assign. It is also possible that Q-assign scheduler jobs (Queueable) get stuck in Processing status for a long time and don't execute in busy customer Orgs. This is a known Salesforce issue and here is more detail on it: https://trailblazer.salesforce.com/issues_view?id=a1p3A000001EGBwQAO

To fix this issue, please follow the steps listed below:

  1. Go to Setup/Apex Jobs
  2. Click on Edit and enter view name as below
  3. Specify filter criteria as shown below and Press Save
  4. In this view, note down the jobs that have Submitted Date of a long time ago. Note down IDs of all such jobs.
  5. Log in to Workbench (https://workbench.developerforce.com/login.php) and set API to 30
  6. Go to utilities > Apex Execute
  7. Run the following command for each of the jobs passing the Job ID noted in step 4:

    System.abortJob('<job id>');

     

    Example:

    System.abortJob('7070b00005z76M4');

    *System.abortJob will have to call for each of those. They can be called all at once if the above command is put each on one line with ID of the job.


Please contact us at support@ortooapps.com for any questions.

Was this information helpful?
Thankyou. Do you want to add anything else?
Thank you.How can we improve this document?
save

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.