Documentation ¶
Index ¶
- Variables
- type Config
- type Cron
- func (c *Cron) AddFunc(spec string, cmd func() error, lockExpire time.Duration) (EntryID, error)
- func (c *Cron) AddJob(spec string, cmd NamedJob, lockExpire time.Duration) (EntryID, error)
- func (c *Cron) Run() error
- func (c *Cron) Schedule(schedule Schedule, job NamedJob, lockExpire time.Duration) EntryID
- func (c *Cron) Stop() error
- func (c *Cron) WithRdb(rdb *redis.Redis) *Cron
- type Entry
- type EntryID
- type FuncJob
- type Job
- type JobWrapper
- type NamedJob
- type Option
- type Parser
- type Schedule
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 int ImmediatelyRun bool // Distributed task DistributedTask bool // contains filtered or unexported fields }
Config ...
func DefaultConfig ¶
func DefaultConfig() Config
type Cron ¶
type Cron struct { *Config *cron.Cron }
Click to show internal directories.
Click to hide internal directories.