Documentation
¶
Index ¶
- type Cron
- type Job
- type Schedule
- type ScheduleFunc
- type ScheduledJob
- type Scheduler
- func (s *Scheduler) AddJob(job *Job) error
- func (s *Scheduler) DisableJob(id string) error
- func (s *Scheduler) EnableJob(id string) error
- func (s *Scheduler) GetJob(id string) (*Job, bool)
- func (s *Scheduler) ListJobs() []*Job
- func (s *Scheduler) RemoveJob(id string) error
- func (s *Scheduler) Start(ctx context.Context) error
- func (s *Scheduler) Stop()
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
}
Cron 定时任务管理器
type Job ¶
type Job struct {
ID string
Name string
Schedule string
Task string
TargetChat string
Enabled bool
LastRun time.Time
NextRun time.Time
RunCount int
}
Job 定时任务
type ScheduleFunc ¶
ScheduleFunc 调度函数
type ScheduledJob ¶
ScheduledJob 定时任务
Click to show internal directories.
Click to hide internal directories.