2023-10-30 15:00:33 +08:00
|
|
|
package contracts
|
|
|
|
|
2024-05-09 13:15:24 +08:00
|
|
|
import "git.fsdpf.net/go/req"
|
|
|
|
|
2023-10-30 15:00:33 +08:00
|
|
|
type CronService interface {
|
|
|
|
Start() error
|
|
|
|
Stop() error
|
|
|
|
Restart() error
|
|
|
|
}
|
|
|
|
|
|
|
|
type Cron interface {
|
|
|
|
Controller
|
|
|
|
// 任务处理
|
2024-05-09 13:15:24 +08:00
|
|
|
Run(req.User) error
|
2023-10-30 15:00:33 +08:00
|
|
|
}
|
2023-10-30 15:44:12 +08:00
|
|
|
|
|
|
|
type CronBase struct {
|
|
|
|
Controller
|
|
|
|
}
|
|
|
|
|
2024-05-09 13:15:24 +08:00
|
|
|
func (CronBase) Run(req.User) error {
|
2023-10-30 15:44:12 +08:00
|
|
|
return nil
|
|
|
|
}
|