schedule

package
v2.0.0-dev.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 IsInScheduleRanges(now time.Time, timeRanges []def.DatetimeRange) (bool, error)

func ValidateRanges

func ValidateRanges(ranges []def.DatetimeRange) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL