cronjob

package
v0.0.0-...-4cb5900 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronFunc

type CronFunc func()

type CronJob

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

func NewCronjob

func NewCronjob() *CronJob

NewCronjob 创建cron任务

func (*CronJob) AddFunc

func (t *CronJob) AddFunc(tasks ...CronTask)

func (*CronJob) Start

func (t *CronJob) Start()

type CronTask

type CronTask struct {
	Spec string
	// contains filtered or unexported fields
}

func NewCronTask

func NewCronTask(spec string, f CronFunc) CronTask

NewCronTask 创建定时任务 spec格式: @every 5s

Jump to

Keyboard shortcuts

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