CrontabSchedule.GetNextOccurrence Method

Namespace:
Weavy.Core.Cron
Assembly:
Weavy.Core.dll

Overloads

GetNextOccurrence(DateTime) Gets the next occurrence of this schedule starting with a base time.
GetNextOccurrence(DateTime, DateTime) Gets the next occurrence of this schedule starting with a base time and up to an end time limit.

GetNextOccurrence(DateTime)

Gets the next occurrence of this schedule starting with a base time.

public DateTime GetNextOccurrence(DateTime baseTime)

Parameters

baseTime
System.DateTime

Returns

System.DateTime

GetNextOccurrence(DateTime, DateTime)

Gets the next occurrence of this schedule starting with a base time and up to an end time limit.

This method does not return the value of baseTime itself if it falls on the schedule. For example, if baseTime is midnight and the schedule was created from the expression * * * * * (meaning every minute) then the next occurrence of the schedule will be at one minute past midnight and not midnight itself. The method returns the next occurrence after baseTime. Also, endTime is exclusive.

public DateTime GetNextOccurrence(DateTime baseTime, DateTime endTime)

Parameters

baseTime
System.DateTime
endTime
System.DateTime

Returns

System.DateTime