This commit is contained in:
lzh
2025-07-14 13:38:45 +08:00
parent b4c7ab9f2c
commit 5356eb4199
2 changed files with 4 additions and 8 deletions

View File

@@ -121,10 +121,8 @@ func (t *TaskJob) InitCronHandle() error {
func (t *TaskJob) EditStatus(status bool) error {
if t.Cron != nil && !status {
t.Cron.Stop()
} else {
if err := t.InitCronHandle(); err != nil {
return err
}
} else if err := t.InitCronHandle(); err != nil {
return err
}
t.TaskConfig.Enable = status
return nil