cron

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCronSpec

func ValidateCronSpec(tomlString string) (job.Job, error)

Types

type Cron

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

Cron runs a cron jobSpec from a CronSpec

func NewCronFromJobSpec

func NewCronFromJobSpec(
	jobSpec job.Job,
	pipelineRunner pipeline.Runner,
) (*Cron, error)

NewCronFromJobSpec() - instantiates a Cron singleton to execute the given job pipelineSpec

func (*Cron) Close

func (cr *Cron) Close() error

Close implements the job.Service interface. It stops this instance from polling, cleaning up resources.

func (*Cron) Start

func (cr *Cron) Start() error

Start implements the job.Service interface.

type Delegate

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

func NewDelegate

func NewDelegate(pipelineRunner pipeline.Runner) *Delegate

func (*Delegate) JobType

func (d *Delegate) JobType() job.Type

func (*Delegate) ServicesForSpec

func (d *Delegate) ServicesForSpec(spec job.Job) (services []job.Service, err error)

ServicesForSpec returns the scheduler to be used for running cron jobs

Jump to

Keyboard shortcuts

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