package contracts import "time" type CronService interface { Start() error Stop() error Restart() error } type Cron interface { Controller // 任务处理 Run(time.Time) error } type CronBase struct { Controller } func (CronBase) Run(t time.Time) error { return nil }