cronjob

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocationString string `env:"CRON_LOCATION" envDefault:"Asia/Shanghai"`
}

type Cron

type Cron interface {
	AddFunc(spec string, cmd func()) (cron.EntryID, error)
	AddJob(spec string, cmd cron.Job) (cron.EntryID, error)
	// Run in current thread
	Run()
	// Start in goroutine
	Start()
	Raw() *cron.Cron
}

func New

func New(config Config) Cron

Jump to

Keyboard shortcuts

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