cronexpr

package
v1.13.6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 6 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