[feat] 定时任务支持

This commit is contained in:
what 2023-10-30 16:38:43 +08:00
parent 00f65c347a
commit 78beb12fd5

View File

@ -1,7 +1,5 @@
package contracts
import "time"
type CronService interface {
Start() error
Stop() error
@ -11,13 +9,13 @@ type CronService interface {
type Cron interface {
Controller
// 任务处理
Run(time.Time) error
Run(User) error
}
type CronBase struct {
Controller
}
func (CronBase) Run(t time.Time) error {
func (CronBase) Run(User) error {
return nil
}