Schedule New Job

Description

LicenseLicense:

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

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

Description: 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

Description: 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

Description: 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

Description: 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

Description: The response format. The default response format is html.

Values: html | json

Example usage

Example 1: 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.

http://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"
}

10/6/2017