Initial commit

This commit is contained in:
2026-05-20 16:13:58 +08:00
commit ceffbe382e
500 changed files with 157469 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package monitorSer
import (
"github.com/robfig/cron/v3"
"stat/common/log"
"stat/common/statutils"
)
var (
auto *cron.Cron
)
func init() {
auto = cron.New(cron.WithSeconds(), cron.WithChain(cron.SkipIfStillRunning(&log.Logger{}))) // 秒级定时任务
}
func InitMonitor() {
_, _ = auto.AddFunc("0 1 * * * ?", func() {
statutils.ServerMon.RunWithName(func() error {
return MonitorCheck()
}, statutils.GetFuncName(MonitorCheck))
})
auto.Start()
}
func MonitorCheck() error {
return nil
}