cron

package
v0.0.0-...-9a49024 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cron

func Cron() cago.Component

Cron 定时任务组件,需要先注册logger和redis组件

func SetDefault

func SetDefault(c Crontab)

SetDefault 设置默认定时任务实例,用于测试注入

Types

type Crontab

type Crontab interface {
	AddFunc(spec string, cmd func(ctx context.Context) error) (cron.EntryID, error)
}

func Default

func Default() Crontab

Jump to

Keyboard shortcuts

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