This commit is contained in:
cdle
2021-09-22 20:41:15 +08:00
parent 008d2023ad
commit 3bdf7a0f77
+4 -1
View File
@@ -199,7 +199,7 @@ func init() {
Admin: true,
Cron: "*/5 * * * *",
Handle: func(s core.Sender) interface{} {
if s.GetImType() == "" && qinglong.Get("autoCronHideDuplicate", "false") == "false" {
if s.GetImType() == "" && qinglong.Get("autoCronHideDuplicate", "true") == "false" {
return nil
}
w := func(s string) int {
@@ -226,6 +226,9 @@ func init() {
if crons[i].IsDisabled != 0 {
continue
}
if strings.Contains(crons[i].Command, "jd_disable.py") {
Req(CRONS, PUT, "/disable", []byte(fmt.Sprintf(`["%s"]`, crons[i].ID)))
}
if task, ok := tasks[crons[i].Name]; ok {
var dup Cron
if w(task.Command) > w(crons[i].Command) {