Add the task service for scan task.

This commit is contained in:
lishuang
2020-07-11 20:46:47 +08:00
parent 7fe673068b
commit 7f394b327b
5 changed files with 184 additions and 17 deletions

View File

@ -0,0 +1,16 @@
package util
import (
"github.com/robfig/cron/v3"
)
//validate a cron
func ValidateCron(spec string) bool {
_, err := cron.ParseStandard(spec)
if err != nil {
return false
}
return true
}