cron

package
v4.90.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: MIT Imports: 10 Imported by: 7 modules, 7 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

This section is empty.

Types

type Cron

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

func New

func New() *Cron

func (*Cron) At

func (c *Cron) At(hour string) *Cron

func (*Cron) Days

func (c *Cron) Days() *Cron

func (*Cron) Done added in v4.88.0

func (c *Cron) Done() <-chan struct{}

func (*Cron) Each

func (c *Cron) Each(interval time.Duration) *Cron

func (*Cron) Exclusive added in v4.6.0

func (c *Cron) Exclusive(semaphore Semaphore, name string, timeout time.Duration) *Cron

func (*Cron) Friday

func (c *Cron) Friday() *Cron

func (*Cron) In

func (c *Cron) In(tz string) *Cron

func (*Cron) MaxRetry

func (c *Cron) MaxRetry(maxRetry uint) *Cron

func (*Cron) Monday

func (c *Cron) Monday() *Cron

func (*Cron) Now

func (c *Cron) Now() *Cron

func (*Cron) OnError

func (c *Cron) OnError(onError func(context.Context, error)) *Cron

func (*Cron) OnSignal

func (c *Cron) OnSignal(signal os.Signal) *Cron

func (*Cron) Retry

func (c *Cron) Retry(retryInterval time.Duration) *Cron

func (*Cron) Saturday

func (c *Cron) Saturday() *Cron

func (*Cron) Start

func (c *Cron) Start(ctx context.Context, action func(context.Context) error)

func (*Cron) String

func (c *Cron) String() string

func (*Cron) Sunday

func (c *Cron) Sunday() *Cron

func (*Cron) Thursday

func (c *Cron) Thursday() *Cron

func (*Cron) Tuesday

func (c *Cron) Tuesday() *Cron

func (*Cron) Wednesday

func (c *Cron) Wednesday() *Cron

func (*Cron) Weekdays

func (c *Cron) Weekdays() *Cron

func (*Cron) WithTracerProvider added in v4.63.3

func (c *Cron) WithTracerProvider(tracerProvider trace.TracerProvider) *Cron

type GetNow added in v4.51.2

type GetNow func() time.Time

type Semaphore added in v4.29.5

type Semaphore interface {
	Exclusive(context.Context, string, time.Duration, func(context.Context) error) (bool, error)
}

Jump to

Keyboard shortcuts

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