schedule

package
v1.4.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 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 []api.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 []api.DatetimeRange) (bool, error)

func ValidateRanges

func ValidateRanges(ranges []api.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