cron

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronEvent added in v0.5.0

type CronEvent struct {
	Time time.Time
}

func (*CronEvent) SetTime added in v0.5.0

func (b *CronEvent) SetTime(t time.Time)

type CronService

type CronService struct {
	Queue  event.Queue  `inject:""`
	Logger *slog.Logger `inject:""`
	// contains filtered or unexported fields
}

func Service

func Service() *CronService

func (*CronService) Name added in v0.5.0

func (c *CronService) Name() string

func (*CronService) Run

func (c *CronService) Run(ctx context.Context) error

func (*CronService) Schedule

func (c *CronService) Schedule(cron string, e Event) *CronService

type Event

type Event interface {
	event.Event
	SetTime(t time.Time)
}

Jump to

Keyboard shortcuts

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