CrontabSchedule.GetNextOccurrences Method

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

GetNextOccurrences(DateTime, DateTime)

Enumerates all the occurrences of this schedule starting with a base time and up to an end time limit. This method uses deferred execution such that the occurrences are only calculated as they are enumerated.

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, is exclusive.

public IEnumerable GetNextOccurrences(DateTime baseTime, DateTime endTime)

Parameters

baseTime
System.DateTime
endTime
System.DateTime

Returns

System.Collections.Generic.IEnumerable{System.DateTime}