cron

package
v0.0.0-...-4359601 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cron provides a wrapper of robfig/cron, which manages schedule cron jobs for horologium

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

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

Cron is a wrapper for cron.Cron

func New

func New() *Cron

New makes a new Cron object

func (*Cron) HasJob

func (c *Cron) HasJob(name string) bool

HasJob returns if a job has been scheduled in cronAgent or not

func (*Cron) QueuedJobs

func (c *Cron) QueuedJobs() []string

QueuedJobs returns a list of jobs that need to be triggered and reset trigger in jobStatus

func (*Cron) Start

func (c *Cron) Start()

Start kicks off current cronAgent scheduler

func (*Cron) Stop

func (c *Cron) Stop()

Stop pauses current cronAgent scheduler

func (*Cron) SyncConfig

func (c *Cron) SyncConfig(cfg *config.Config) error

SyncConfig syncs current cronAgent with current prow config which add/delete jobs accordingly.

Jump to

Keyboard shortcuts

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