Documentation ¶
Index ¶
- Variables
- type Cron
- func (c *Cron) AddFunc(spec string, cmd func(), key, name, desc string) (*Entry, error)
- func (c *Cron) AddJob(spec string, cmd Job) (*Entry, error)
- func (c *Cron) Client() *cron.Cron
- func (c *Cron) Entries() []*Entry
- func (c *Cron) Entry(key string) *Entry
- func (c *Cron) ExecJob(key string) error
- func (c *Cron) Has(key string) bool
- func (c *Cron) Remove(key string)
- func (c *Cron) Start()
- func (c *Cron) Stop()
- type Entry
- type FuncJob
- func (job *FuncJob) Desc() string
- func (job *FuncJob) Key() string
- func (job *FuncJob) Name() string
- func (job *FuncJob) Option(map[string]any)
- func (job *FuncJob) Run()
- func (job *FuncJob) SetDesc(desc string)
- func (job *FuncJob) SetJob(cmd func())
- func (job *FuncJob) SetKey(key string)
- func (job *FuncJob) SetName(name string)
- type Job
- type Logger
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Cron ¶
type Cron struct {
// contains filtered or unexported fields
}
type Entry ¶
type Entry struct { ID cron.EntryID // Next time the job will run, or the zero time if Cron has not been // started or this entry's schedule is unsatisfiable Next time.Time // Prev is the last time this job was run, or the zero time if never. Prev time.Time Name string Desc string Spec string Key string // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.