crontab

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Every1s = "@every 1s"
	Every5s = "@every 5s"
	Every1m = "@every 1m"
	Every1h = "@every 1h"
)

Variables

This section is empty.

Functions

func StartCron

func StartCron(cronExp string, cronFun func()) error

func StartCronJob

func StartCronJob(cronExp string, job cron.Job) error

func StartCronJobV3 added in v0.0.9

func StartCronJobV3(cronExp string, job Job) error

func StartCronV3 added in v0.0.9

func StartCronV3(cronExp string, cronFun func()) error

func StartMoreCron

func StartMoreCron(cronMap map[string]func()) error

StartMoreCron 启动多个定时任务

func StartMoreCronV3 added in v0.0.9

func StartMoreCronV3(cronMap map[string]func()) (map[cron.EntryID]error,
	error)

StartMoreCronV3 启动多个定时任务

Types

type Job

type Job interface {
	Run()
}

Job 接口

Jump to

Keyboard shortcuts

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