Documentation ¶
Index ¶
- func IsAfterTimeRanges(now time.Time, ranges []def.DatetimeRange) bool
- func IsInRunningSchedule(cronExpr string, now time.Time, d time.Duration) (bool, time.Duration, error)
- func IsInScheduleRanges(now time.Time, timeRanges []def.DatetimeRange) (bool, error)
- func ValidateRanges(ranges []def.DatetimeRange) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAfterTimeRanges ¶
func IsAfterTimeRanges(now time.Time, ranges []def.DatetimeRange) bool
func IsInRunningSchedule ¶
func IsInRunningSchedule(cronExpr string, now time.Time, d time.Duration) (bool, time.Duration, error)
IsInRunningSchedule checks whether the rule should be running, eg: If the duration is 10min, and cron is "0 0 * * *", and the current time is 00:00:02 And the rule should be started immediately instead of checking it on the next day.
func IsInScheduleRanges ¶
func ValidateRanges ¶
func ValidateRanges(ranges []def.DatetimeRange) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.