mirror of https://github.com/ouqiang/gocron
定时任务-使用不支持的任务协议时,返回nil
parent
27eb3913c5
commit
a336e50366
|
@ -156,6 +156,9 @@ func createHandlerJob(taskModel models.Task) cron.FuncJob {
|
|||
case models.SSHScript:
|
||||
handler = new(SSHScriptHandler)
|
||||
}
|
||||
if handler == nil {
|
||||
return nil
|
||||
}
|
||||
taskFunc := func() {
|
||||
taskLogId, err := createTaskLog(taskModel.Id)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue