xcron

package
v0.0.0-...-d6ac821 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Every ...
	Every = cron.Every
	// NewParser ...
	NewParser = cron.NewParser
	// NewChain ...
	NewChain = cron.NewChain
	// WithSeconds ...
	WithSeconds = cron.WithSeconds
	// WithParser ...
	WithParser = cron.WithParser
	// WithLocation ...
	WithLocation = cron.WithLocation
)

Functions

This section is empty.

Types

type Config

type Config struct {
	WithSeconds     bool
	ConcurrentDelay time.Duration
	ImmediatelyRun  bool
	// contains filtered or unexported fields
}

Config ...

func DefaultConfig

func DefaultConfig() Config

DefaultConfig ...

func RawConfig

func RawConfig(key string) Config

RawConfig ...

func StdConfig

func StdConfig(name string) Config

StdConfig ...

func (Config) Build

func (config Config) Build() *Cron

Build ...

func (*Config) WithChain

func (config *Config) WithChain(wrappers ...JobWrapper) Config

WithChain ...

func (*Config) WithLogger

func (config *Config) WithLogger(logger *xlog.Logger) Config

WithLogger ...

func (*Config) WithParser

func (config *Config) WithParser(parser Parser) Config

WithParser ...

type Cron

type Cron struct {
	*Config
	*cron.Cron
	// contains filtered or unexported fields
}

Cron ...

func (*Cron) AddFunc

func (c *Cron) AddFunc(spec string, cmd func() error) (EntryID, error)

AddFunc ...

func (*Cron) AddJob

func (c *Cron) AddJob(spec string, cmd NamedJob) (EntryID, error)

AddJob ...

func (*Cron) GetEntryByName

func (c *Cron) GetEntryByName(name string) cron.Entry

GetEntryByName ...

func (*Cron) Run

func (c *Cron) Run() error

Run ...

func (*Cron) Schedule

func (c *Cron) Schedule(schedule Schedule, job NamedJob) EntryID

Schedule ...

func (*Cron) Stop

func (c *Cron) Stop() error

Stop ...

type Entry

type Entry = cron.Entry

JobWrapper ...

type EntryID

type EntryID = cron.EntryID

JobWrapper ...

type FuncJob

type FuncJob func() error

FuncJob ...

func (FuncJob) Name

func (f FuncJob) Name() string

Name ...

func (FuncJob) Run

func (f FuncJob) Run() error

Run ...

type Job

type Job = cron.Job

JobWrapper ...

type JobWrapper

type JobWrapper = cron.JobWrapper

JobWrapper ...

type NamedJob

type NamedJob interface {
	Run() error
	Name() string
}

JobWrapper ...

type Option

type Option = cron.Option

JobWrapper ...

type Parser

type Parser = cron.Parser

JobWrapper ...

type Schedule

type Schedule = cron.Schedule

JobWrapper ...

Jump to

Keyboard shortcuts

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