cron

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package cron provides a cron scheduling interface and its production implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RealScheduler

type RealScheduler struct {
	*cron.Cron
}

RealScheduler wraps robfig/cron for production use.

func NewRealScheduler

func NewRealScheduler() *RealScheduler

NewRealScheduler creates a production cron scheduler.

func (*RealScheduler) Start

func (r *RealScheduler) Start()

Start starts the cron scheduler.

func (*RealScheduler) Stop

func (r *RealScheduler) Stop()

Stop stops the cron scheduler.

type Scheduler

type Scheduler interface {
	AddFunc(spec string, cmd func()) (cron.EntryID, error)
	Remove(id cron.EntryID)
	Start()
	Stop()
	Entries() []cron.Entry
}

Scheduler is an interface for cron scheduling operations.

Jump to

Keyboard shortcuts

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