cron

package
v2.0.32 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICron

type ICron interface {
	String() string
	GetCron() *gcron.Cron
	GetRawJobs() []Job
	GetWorkers() map[string]*gcron.Entry

	Start(context.Context)
	AddJobs(...Job) ICron
	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