scheduler

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalScheduler = &Scheduler{
	Jobs:   make(map[string]*ScheduledJob),
	StopCh: make(chan struct{}),
}

Functions

This section is empty.

Types

type CronSchedule

type CronSchedule struct {
	Minutes     []int // 0-59
	Hours       []int // 0-23
	DaysOfMonth []int // 1-31
	Months      []int // 1-12
	DaysOfWeek  []int // 0-6 (0=Sunday)
	Raw         string
}

func (*CronSchedule) Matches

func (cs *CronSchedule) Matches(t time.Time) bool

func (*CronSchedule) Next

func (cs *CronSchedule) Next(from time.Time) time.Time

type ScheduledJob

type ScheduledJob struct {
	ID       string
	Name     string
	Schedule *CronSchedule
	Handler  object.Object
	Env      *object.Environment
	Once     bool
	Interval time.Duration
	NextRun  time.Time
	LastRun  time.Time
	RunCount int64
	Active   bool
	// contains filtered or unexported fields
}

type Scheduler

type Scheduler struct {
	Jobs map[string]*ScheduledJob

	StopCh chan struct{}
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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