다음을 통해 공유


TimerJobUtility.CancellationGranularity Property

Gets or sets the granularity at which a timer job can be paused or cancelled.

Namespace:  Microsoft.Office.Server.Utilities
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Property CancellationGranularity As IterationGranularity
    Get
    Set
'Usage
Dim instance As TimerJobUtility
Dim value As IterationGranularity

value = instance.CancellationGranularity

instance.CancellationGranularity = value
public IterationGranularity CancellationGranularity { get; set; }

Property Value

Type: Microsoft.Office.Server.Utilities.IterationGranularity
Returns IterationGranularity.

Remarks

If your timer job is processing at the level of SPListItem objects but the CancellationGranularity is set to P:Microsoft.Office.Server.Utilities.IterationGranularity.List, then if the job is cancelled or paused while processing a list, the job will continue until all of the items in the current list are processed before it stops. However, if the CancellationGranularity is set to P:Microsoft.Office.Server.Utilities.IterationGranularity.Item, then the job will be stopped as soon as the current item that is being processed is finished.

See Also

Reference

TimerJobUtility Class

TimerJobUtility Members

Microsoft.Office.Server.Utilities Namespace