cron

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Crontab

func Crontab() *crontab

Types

type Adapter

type Adapter interface {
	String() string
	Start(context.Context)
	AddJobs(...Job) Adapter
	GetJobs() []*gcron.Entry
	StartJob(context.Context, string) bool
	StopJob(context.Context, string) bool
	Stop(context.Context)
}

type Job

type Job interface {
	GetSpec() *JobSpec
	Handle(ctx context.Context)
}

type JobSpec

type JobSpec struct {
	Name    string
	Pattern string
}

Jump to

Keyboard shortcuts

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