Export (0) Print
Expand All

SPJobDefinition.Schedule property

Gets or sets the schedule of the job definition.

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

public SPSchedule Schedule { get; set; }

Property value

Type: Microsoft.SharePoint.SPSchedule
An SPSchedule object.

ExceptionCondition
ArgumentNullException

The value that you attempted to set is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The DateTime structure in the Time property of an SPOneTimeSchedule object specifies a year prior to 1900.

SPException

You are attempting to convert a one-time job to a recurring job, or a recurring job to a one-time job.

If you want the job to run immediately, call the RunNow() method.

Show:
© 2014 Microsoft