contracts/cron.go
2023-10-30 16:23:45 +08:00

24 lines
281 B
Go

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
}