contracts/cron.go

22 lines
254 B
Go
Raw Normal View History

2023-10-30 15:00:33 +08:00
package contracts
type CronService interface {
Start() error
Stop() error
Restart() error
}
type Cron interface {
Controller
// 任务处理
2023-10-30 16:38:43 +08:00
Run(User) error
2023-10-30 15:00:33 +08:00
}
2023-10-30 15:44:12 +08:00
type CronBase struct {
Controller
}
2023-10-30 16:38:43 +08:00
func (CronBase) Run(User) error {
2023-10-30 15:44:12 +08:00
return nil
}