contracts/cron.go
2023-10-30 15:44:12 +08:00

24 lines
287 B
Go

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