cron

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *cronJobTable

func ParseNextTime

func ParseNextTime(cronLine string) (nextTime time.Time, err error)

Types

type Expression

type Expression struct {
	// contains filtered or unexported fields
}

func Parse

func Parse(cronLine string) (*Expression, error)

func (*Expression) Next

func (expr *Expression) Next(fromTime time.Time) time.Time

Next returns the closest time instant immediately following `fromTime` which matches the cron expression `expr`

func (*Expression) NextN

func (expr *Expression) NextN(fromTime time.Time, n uint) []time.Time

NextN returns a slice of `n` closest time instants immediately following `fromTime` which match the cron expression `expr`

type Job

type Job struct {
	NextTime time.Time
	// contains filtered or unexported fields
}

Job cron job

Jump to

Keyboard shortcuts

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