How to abort SalesWings Apex jobs

Follow these steps to abort the Saleswings sync Apex jobs manually.

Pauline from SalesWings avatar
Written by Pauline from SalesWings
Updated over a week ago

In some instances, you may be recommended by the SalesWings support team to abort Apex/scheduled jobs.

When should you abort Apex jobs?

The most obvious use case to manually abort jobs using described below methods is when pausing the sync from SalesWings Setup page didn’t work.

Another example is when your SalesWings sync seems to be ran by two different users, leading to potential conflict.

💡Reminder: This document describes the synchronization workflow between Salesforce Sales Cloud and SalesWings.

How to abort Apex jobs?

There are multiple ways to abort Apex/scheduled jobs.

:blue_book:

To abort Apex job

  1. Go to Setup

  2. Search "Apex Jobs" in the quick find box

  3. Click "Apex Jobs"

  4. Click on "Abort" link beside the SalesWings Apex job that you wanted to abort.

:blue_book:

To Delete the job from UI

  1. Go to Setup

  2. Search "Scheduled" in the quick find box

  3. Click "Scheduled Jobs"

  4. Click on "Del" link beside the SalesWings scheduled job that you wanted to delete.

:blue_book:

To kill scheduled or future Apex jobs from Developer Console:

  1. Open Developer Console | Debug | Open Execute Anonymous Window.

  2. Run the following query to find the scheduled or future Apex job id to delete: [SELECT ApexClassId,CompletedDate,CreatedById,CreatedDate,ExtendedStatus,Id,JobItemsProcessed,JobType,LastProcessed,LastProcessedOffset,MethodName,NumberOfErrors,ParentJobId,Status,TotalJobItems FROM AsyncApexJob where status = 'queued']

  3. Replace text "JobID" in the following line of code with the Job Id you found in the query in step 5, then click Execute. [System.abortJob('JobID');]

  4. The scheduled or future Apex job should get deleted.

:blue_book:

To kill long running future Apex jobs from Workbench

  1. Go to Workbench.

  2. Select the Environment.

  3. Choose a lower API version to 32.0.

  4. Enter username and password.

  5. Go to Query | SOQL Query. Run the following query to find a queued status scheduled or future Apex job id to abort: [SELECT ApexClassId,CompletedDate,CreatedById,CreatedDate,ExtendedStatus,Id,JobItemsProcessed,JobType,LastProcessed,LastProcessedOffset,MethodName,NumberOfErrors,ParentJobId,Status,TotalJobItems FROM AsyncApexJob where status = 'queued']

  6. Once you find the jobId to delete: Go to Utilities | Apex Execute.

  7. Replace text "JobID" in the following line of code with the Job Id you found in the query in step 5, then click Execute. [System.abortJob('JobID');]

  8. The scheduled Apex job should get deleted.

Did this answer your question?