This topic has not yet been rated - Rate this topic

SPSchedule.NextOccurrence method

Returns a random time in the period between the begin and end times specified by the schedule that occurs after the specified time.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
public virtual DateTime NextOccurrence(
	DateTime dt
)

Parameters

dt
Type: System.DateTime
A System.DateTime structure that specifies the date and time after which the randomized time occurs.

Return value

Type: System.DateTime
A System.DateTime value that represents the next occurrence.

A custom class that is derived from the SPSchedule class must override this method.

Calling the NextOccurrence method for a job definition returns a random time and not the next time the job will run.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.