scheduler

package
v0.0.0-...-15db9d3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCrontab

func ParseCrontab(spec string) (cron.Schedule, error)

ParseCrontab parses a cron expression with support for the crontab(5) random ~ syntax. Random values are resolved once at parse time. If no ~ is present, it delegates to robfig/cron's standard parser. Duration strings (e.g., "5m") are converted to "@every 5m".

Types

type Scheduler

type Scheduler interface {
	Run(ctx context.Context)
	Add(crontab string, cmd func()) (int, error)
	Remove(id int)
}

func GetInstance

func GetInstance() Scheduler

Jump to

Keyboard shortcuts

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