SPJobState.ShouldStop Property

Gets a property specifying whether the job should stop.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public ReadOnly Property ShouldStop As Boolean
    Get
'Usage
Dim instance As SPJobState
Dim value As Boolean

value = instance.ShouldStop
public bool ShouldStop { get; }

Property Value

Type: System.Boolean
A Boolean value indicating whether the job should stop.

Remarks

The timer service will set this property to true when a job is paused or the service will be stopped. Jobs should check this property periodically (usually after processing each item), and if true, set their state and stop executing.

See Also

Reference

SPJobState Class

SPJobState Members

Microsoft.SharePoint.Administration Namespace