cronx

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 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 AddDelayTask added in v0.0.47

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

AddDelayTask adds a task that runs after a specified delay.

func AddEveryTask added in v0.0.47

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

AddEveryTask is a convenience function to add a task that runs at a regular interval.

func AddOnceTask added in v0.0.47

func AddOnceTask(runAt time.Time, f func(ctx context.Context), timeout ...time.Duration)

AddOnceTask adds a task that runs only once at the specified time.

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), doneCallback func(), timeout ...time.Duration) func()

Types

This section is empty.

Jump to

Keyboard shortcuts

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