Geoprocessing service GetJobStatus method

Gets the current status of a geoprocessing job.

GetJobStatus(string JobID)

Parameter

Description

JobID

The unique id of the geoprocessing job on which to return the current execution status.

Return Value

A esriJobStatus enumeration.

Remarks

The job status is updated when the job is submitted, waiting, has failed to start, when executing, paused, has succeeded, failed, and timed out. For job status options, see esriJobStatus.

Examples

C#

//to obtain the jobid for the input parameter see SubmitJob

esriJobStatus jobStat = gpserver.GetJobStatus(jobID);

 

//poll the server until job completes

while (jobStat == esriJobStatus.esriJobWaiting ||

jobStat == esriJobStatus.esriJobSubmitted ||

jobStat == esriJobStatus.esriJobExecuting ||

jobStat == esriJobStatus.esriJobCancelling ||

jobStat == esriJobStatus.esriJobDeleting ||

jobStat == esriJobStatus.esriJobNew)

{

      System.Threading.Thread.Sleep(500);

      System.Console.WriteLine(jobStat.ToString());

      jobStat = gpserver.GetJobStatus(jobID);

}

2/28/2020