cronexpr

package
v1.17.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schedule

type Schedule interface {
	Next(time.Time) time.Time
	NextInterval(time.Time) time.Duration
}

Schedule abstraction for calculate next interval time

func MustParse

func MustParse(cronLine string) Schedule

MustParse returns a new Expression pointer. It expects a well-formed cron expression. If a malformed cron expression is supplied, it will `panic`. See <https://github.com/gorhill/cronexpr#implementation> for documentation about what is a well-formed cron expression from this library's point of view.

func Parse

func Parse(cronLine string) (Schedule, error)

Parse returns a new Expression pointer. An error is returned if a malformed cron expression is supplied. See <https://github.com/gorhill/cronexpr#implementation> for documentation about what is a well-formed cron expression from this library's point of view.

Jump to

Keyboard shortcuts

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