crontab

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronOpts

type CronOpts struct {
	EnableSeconds bool  `yaml:"enableSeconds" json:"enableSeconds" validate:"required"`
	Jobs          []Job `yaml:"jobs" json:"jobs" validate:"required"`
}

type Crontab

type Crontab struct {
	CronServer *cron.Cron
	Ctx        context.Context
	Logger     *svclogger.Log
	WGroup     *sync.WaitGroup
}

func New

func New(aCtx context.Context, alog *svclogger.Log, opts *CronOpts) Crontab

func (*Crontab) LoadTasks

func (ct *Crontab) LoadTasks(aCtx context.Context, opts *CronOpts)

func (Crontab) StartCron

func (ct Crontab) StartCron()

func (*Crontab) StopCron

func (ct *Crontab) StopCron()

type Job

type Job struct {
	Name     string `yaml:"name" json:"name" validate:"required"`
	Schedule string `yaml:"schedule" json:"schedule" validate:"required"`
	Disable  bool   `yaml:"disable" json:"disable" validate:"required"`
}

Jump to

Keyboard shortcuts

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