SPTimerServiceInstance.AllowContentDatabaseJobs property

Gets or sets a Boolean value that specifies whether content database timer jobs can be run by this timer service instance.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Property AllowContentDatabaseJobs As Boolean
    Get
    Set
'Usage
Dim instance As SPTimerServiceInstance
Dim value As Boolean

value = instance.AllowContentDatabaseJobs

instance.AllowContentDatabaseJobs = value
public bool AllowContentDatabaseJobs { get; set; }

Property value

Type: System.Boolean
Returns Boolean true if the service instance can run content database timer jobs; otherwise, returns false. The default value is true.

Remarks

You must restart the timer service if you change this property. When changing this property, you must also call the Update() method, as this allows changes to object state to be persisted to the configuration database and propagated to all machines across the farm.

Note that if a server is set as the “preferred” server for content database timer jobs, then setting this property to false will cause an exception.

See also

Reference

SPTimerServiceInstance class

SPTimerServiceInstance members

Microsoft.SharePoint.Administration namespace