Click or drag to resize
SchedulingHelperGetNextTime Method (TaskInterval, NullableDateTime, NullableDateTime)
Returns date and time when the next scheduling moment occurs based on the current date and time and the scheduling pattern.

Namespace: CMS.Scheduler
Assembly: CMS.Scheduler (in CMS.Scheduler.dll) Version: 9.0.0
Syntax
C#
public static DateTime GetNextTime(
	TaskInterval taskInterval,
	Nullable<DateTime> lastPlannedRunTime = null,
	Nullable<DateTime> currentTime = null
)

Parameters

taskInterval
Type: CMS.SchedulerTaskInterval
Information about task repeating
lastPlannedRunTime (Optional)
Type: SystemNullableDateTime
Last known planned run time of task, if null taskInterval.StartTime is used
currentTime (Optional)
Type: SystemNullableDateTime
Date and time to resolve against, if null DateTime.Now is used

Return Value

Type: DateTime
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen task interval is null
Remarks
See Also