QueueSystem.CancelJob method

Office 2013 and later

Cancels the specified job in the Project Server Queuing Service. Allows correlated and incomplete jobs to be cancelled.

Namespace:  WebSvcQueueSystem
Assembly:  ProjectServerServices (in ProjectServerServices.dll)

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/QueueSystem/CancelJob", RequestNamespace = "http://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", 
	ResponseNamespace = "http://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void CancelJob(
	Guid jobUID,
	bool cancelCorrelationJobs,
	bool cancelSendIncompleteJobs
)

Parameters

jobUID
Type: System.Guid

Queue job GUID.

cancelCorrelationJobs
Type: System.Boolean

If true, cancel correlated jobs.

cancelSendIncompleteJobs
Type: System.Boolean

If true, also cancel jobs that are still getting queued (the JobState is SendIncomplete).

CancelJob sets the job completion state (JobState) of the specified job to Canceled. If cancelCorrelationJobs is false, the result is functionally equivalent to setting the state to FailedNotBlocking; that is, the current job failed, but correlated jobs farther down the queue continue to process.

NoteNote

There is a potential race condition between checking the state of a job and calling CancelJob. When an application checks the state of a job, the state might be ReadyForProcessing. Before calling CancelJob, the state can switch to Processing or any other state.

Project Server Permissions

Permission

Description

ManageQueue

Allows the user to manage the Project Server queue. Global permission.

Show: