cron

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(action func(), rules ...string) (id uint, err error)

Add 添加一个任务到自动任务列表

@action:触发的函数,同一时间只会触发一次

@rules:触发点 格式:"ss mm hh DD MM YYYY",可传入多个,若不传则每秒执行,是action执行间隔的最小单元

例:

"00":每分

"00 30 08":每天08:30

"05 30 08 14 09 2021":2021-09-14 08:30:05

func Clear

func Clear(ids ...uint)

Clear 清除任务

Types

This section is empty.

Jump to

Keyboard shortcuts

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