scheduler

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InWindow added in v1.4.0

func InWindow(spec string, now time.Time) (bool, error)

InWindow reports whether the cron spec matches the minute that contains now, evaluated in the spec's CRON_TZ zone (or now's own location when the spec has no zone prefix). With a seconds field, any matching second inside the minute counts. An empty or invalid spec returns an error: callers must fail closed.

Types

type Scheduler

type Scheduler struct {
	// contains filtered or unexported fields
}

Scheduler manages the timing of update checks

func New

func New(cfg *config.Config) *Scheduler

New creates a new scheduler

func (*Scheduler) Start

func (s *Scheduler) Start(fn func())

Start begins the scheduler

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Stop stops the scheduler

Jump to

Keyboard shortcuts

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