5

The official documention for the CronJobDetail object lists only 6 job types.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_cronjobdetail.htm

Data Export (0) Dashboard Refresh (3) Reporting Snapshot (4) Scheduled Apex (7) Report Run (8) Batch Job (9)

There are clearly more Job Types. I have a Job Type "A" which coordinates to "Reporting Notification". It looks like it is related to subscribing to get report notifications.

https://help.salesforce.com/htviewhelpdoc?id=reports_notifications_home.htm&siteLang=en_US

Does anyone have a full list of Job Types? It does not seem that Salesforce provides this in detail.

2
  • 1
    I tweeted to the Salesforce Docs team about this. Hopefully they can update the documentation.
    – mkdjns
    Commented Sep 30, 2016 at 4:27
  • 1
    Yes...doc has been updated...now!
    – Ayub
    Commented May 26, 2018 at 6:32

4 Answers 4

1

The documentation lists the names for 1-A. You can also see these by running some Anonymous Apex to look at the picklist values:

List<Schema.PicklistEntry> picklistOptions = new CronJobDetail()
  .getSObjectType()
  .getDescribe()
  .fields.getMap()
  .get('JobType')
  .getDescribe()
  .getPicklistValues();

for (Schema.PicklistEntry picklistItem : picklistOptions) {
  System.debug(picklistItem.getLabel() + ' - ' + picklistItem.getValue());
}

But as Damecek mentioned, the document is not being kept up to date. And, as it turns out, neither is the picklist values returned by the DescribeFieldResult.


In order to overcome this shortcoming, at my work, I've been, on occasion trying to record others as I see them, so far I've added E, G, K, T, and X. I can see job type C in my CronJobDetails, but since it isn't scheduled, I can't figure out the Name value for it.

Here's my current list:

  • Data Export - 1
  • Dashboard Refresh - 3
  • Reporting Snapshot - 4
  • Scheduled Flow - 6
  • Scheduled Apex - 7
  • Report Run - 8
  • Batch Job - 9
  • Reporting Notification - A
  • Sitemap SEO Generation Job - E
  • Sitemap SEO Incremental Job - G
  • Autonomous Data Loader Job - K
  • Report Type Metadata for Search - T
  • Standard Report Type Metadata for Search - X

If anyone records any more, that'd be greatly appreciated.

Here's some pictures showing what we see in our org that we based the above data on: image showing developer console. Uses the query "SELECT Id, Name, JobType FROM CronJobDetail". This is where you can get the JobType number code image showing scehduled jobs. This is where you can get the Name of the JobType (by matching up the Job Names)

0

For what it's worth I'm seeing a JobType of '1' which has a Name value of 'Data Export'. The total list of values I'm getting are: 1, 3, 4, 7, 8 and A

I've been trying to figure out how to stop SerialBatchApexRangeChunkHandler operations that were spawned from a now aborted scheduled batch job, doesn't seem that the JobType is helpful with that.

0

As stated in the comment, the documentation has been updated.

1—Data Export
3—Dashboard Refresh
4—Reporting Snapshot
6—Scheduled Flow
7—Scheduled Apex
8—Report Run
9—Batch Job
A—Reporting Notification

But Salesforce is still introducing new JobTypes e.g. C,E, ... Which are missing in the documentation.

0

E and G corresponds to Job related to your Site.com. You can find the site ID by last phrase of the job name. For more details - https://community.servicemax.com/s/article/Steps-to-Run-Salesforce-Sitemap-Jobs-with-Active-User

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .