cherryCron

package
v1.1.29 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDurationFunc added in v1.1.26

func AddDurationFunc(cmd func(), duration time.Duration) (cron.EntryID, error)

AddDurationFunc 每间隔x秒执行一次

func AddEveryDayFunc

func AddEveryDayFunc(cmd func(), hour, minutes, seconds int) (cron.EntryID, error)

AddEveryDayFunc 每天的x时x分x秒执行一次(每天1次)

func AddEveryHourFunc

func AddEveryHourFunc(cmd func(), minute, second int) (cron.EntryID, error)

AddEveryHourFunc 每小时的x分x秒执行一次(每天24次)

func AddFunc

func AddFunc(spec string, cmd func()) (cron.EntryID, error)

func AddJob

func AddJob(spec string, cmd cron.Job) (cron.EntryID, error)

func Entries

func Entries() []cron.Entry

func Entry

func Entry(id cron.EntryID) cron.Entry

func Init

func Init(opts ...cron.Option)

func Location

func Location() *time.Location

func RegisterComponent

func RegisterComponent(opts ...cron.Option)

func Remove

func Remove(id cron.EntryID)

func Run

func Run()

func Schedule

func Schedule(schedule cron.Schedule, cmd cron.Job) cron.EntryID

func Start

func Start()

func Stop

func Stop()

Types

type CronLogger

type CronLogger struct{}

func (CronLogger) Error

func (CronLogger) Error(err error, _ string, _ ...interface{})

func (CronLogger) Info

func (CronLogger) Info(msg string, keysAndValues ...interface{})

Jump to

Keyboard shortcuts

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