cronjob

package
v1.32.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 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 CronJob

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

func Setup

func Setup() *CronJob

func (*CronJob) AddJob

func (j *CronJob) AddJob(name string, expression string, exec func()) error

func (*CronJob) ListJobs

func (j *CronJob) ListJobs() []*Job

ListJobs returns a slice of all running jobs

func (*CronJob) Start

func (j *CronJob) Start()

type Job

type Job struct {
	Name       string
	Expression string
	// contains filtered or unexported fields
}

func (*Job) Run

func (j *Job) Run()

type JobExec

type JobExec interface {
	Exec(arg interface{}) error
}

Jump to

Keyboard shortcuts

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