Schedule New Job

Description

LicenseLicense:

The ArcGIS Data Reviewer Server extension is required to use this resource.

NoteNote:

This resource is dependent on ArcGIS Data Reviewer’s ArcMap runtime-based server object extension (SOE). ArcGIS Enterprise 10.9.x, part of the ArcGIS 2021 releases, will be the last release of ArcGIS Enterprise to support services published from ArcMap.

To prepare for this change, Esri recommends that customers consider Data Reviewer capabilities enabled using ArcGIS Pro and integrated in the Validation service.

A REST resource that schedules a new job for execution. Execution does not start until the date and time you specify. Use a cron time and date string to indicate time of execution.

The batchValidationSettings parameter contains the following name/value pairs:

The schedule parameter contains the following name/value pairs:

Request parameters

Parameter

Details

batchValidationSettings

JSON object with four name/value pairs

Values: {"batchJobFileItemId":"<upload itemId>", "sessionId":"<reviewer_session_id>","productionWorkspace":"<path to production workspace>" ,"productionWorkspaceVersion":"<name of version>" ,"analysisArea":<JSON polygon>,"changedFeaturesOnly":true | false}

schedule

JSON object with one required name/value pair and two optional name/value pairs.

Values: {"cronExpression":"seconds, minutes, hours, day-of-month, month, day-of-week, year," "executionsEndDate (optional)":"<ending date in epoch time in milliseconds>", "maxNumberOfExecutions (optional)":"<number of executions>"}.

batchValidationJobTitle

The batch validation job title. This information is stored in the scheduler database with the adhoc job information. It is not stored in the Data Reviewer workspace. The getJobDetails operation returns information that includes the job title.

batchValidationJobCreatedBy

Indicates the user name that executes the adhoc job. This information is stored in the scheduler database with the adhoc job information. It is not stored in the Reviewer workspace. The getJobDetails operation returns information that includes the job created by name.

f

The response format. The default response format is html.

Values: html | json

Example usage

Schedules a batch job. The request specifies a production workspace, an upload itemId, a session, and an execution schedule of every day at 10:30 (0 30 10 * * ?). Submitting this request will return an scheduled job id, but actual batch validation execution may fail if you don't have this production workspace or session. To use this sample request:

  1. Change the production workspace (or remove it).
  2. Change the session id if your Data Reviewer workspace does not have a session called "Session 1 : Session 1."
  3. Upload a batch job file. The upload operation returns an itemId. Change the batchJobFileItemId to your uploaded itemId.

https://localhost:6080/arcgis/rest/services/reviewer/MapServer/exts/DataReviewerServer/BatchValidation/scheduleNewJob?batchValidationSettings={"batchJobFileItemId":"ifff042a8-cbc5-43e7-b1ad-1a4edd593c0e","sessionId":"Session 1 : Session 1","productionWorkspace":"c:\\data\\LocalGovernment.gdb"}&schedule={"cronExpression":"0 30 10 * * ?"}&batchValidationJobTitle=&batchValidationJobCreatedBy=&f=pjson

JSON Response example

{
  "scheduledJobId": "f43570ee-c9db-4a6c-bcd1-54bf6f9627c7"
}