cronx

package
v0.0.45 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCronTask added in v0.0.43

func AddCronTask(spec string, f func(ctx context.Context), timeout ...time.Duration)

func AddTask deprecated

func AddTask(spec string, f func())

Deprecated: Use AddCronTask instead. This version does not support context propagation or panic recovery

func Shutdown

func Shutdown(code string, ctx context.Context) error

func Startup

func Startup(code, port string) error

func WrapCronTask added in v0.0.43

func WrapCronTask(f func(ctx context.Context), timeout ...time.Duration) func()

Types

type Task

type Task struct {
	Spec string
	Name string
	Func func()
}

type TaskSlice

type TaskSlice []*Task

Jump to

Keyboard shortcuts

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