cron

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: BSD-2-Clause Imports: 5 Imported by: 7

README

Cron

Run something over and over again.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron interface {
	Run(ctx context.Context) error
}

type CronJob

type CronJob interface {
	Run(ctx context.Context) error
}

func NewCronJob

func NewCronJob(
	oneTime bool,
	expression string,
	wait time.Duration,
	action func(ctx context.Context) error,
) CronJob

func NewExpressionCron

func NewExpressionCron(
	ext string,
	action action,
) CronJob

func NewOneTimeCron

func NewOneTimeCron(
	action action,
) CronJob

func NewWaitCron

func NewWaitCron(
	wait time.Duration,
	action action,
) CronJob

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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