cronjob

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init() (err error)

func Register

func Register(fn func() error, spec string, name string, config ...Config)

Register cronjob can be called at any point before or after Init(). The config parameter is optional and can be used to customize cronjob behavior.

Types

type Config added in v0.9.6

type Config struct {
	// RunImmediately indicates whether to run the cronjob immediately after registration
	// in addition to the scheduled execution
	RunImmediately bool `json:"run_immediately" yaml:"run_immediately" toml:"run_immediately"`
}

Config defines the configuration for cronjob package

Jump to

Keyboard shortcuts

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