cron

package
v2.10.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatedCronSpec

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

Types

type Cron

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

Cron runs a cron jobSpec from a CronSpec

func NewCronFromJobSpec

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

NewCronFromJobSpec instantiates a job that executes on a predefined schedule.

func (*Cron) Close

func (cr *Cron) Close() error

Close implements the job.Service interface. It stops this job from running and cleans up resources.

func (*Cron) Start

func (cr *Cron) Start(context.Context) error

Start implements the job.Service interface.

type Delegate

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

func NewDelegate

func NewDelegate(pipelineRunner pipeline.Runner, lggr logger.Logger) *Delegate

func (*Delegate) AfterJobCreated

func (d *Delegate) AfterJobCreated(spec job.Job)

func (*Delegate) BeforeJobCreated

func (d *Delegate) BeforeJobCreated(spec job.Job)

func (*Delegate) BeforeJobDeleted

func (d *Delegate) BeforeJobDeleted(spec job.Job)

func (*Delegate) JobType

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

func (*Delegate) OnDeleteJob

func (d *Delegate) OnDeleteJob(spec job.Job, q pg.Queryer) error

func (*Delegate) ServicesForSpec

func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services []job.ServiceCtx, 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