This commit is contained in:
2026-03-19 18:54:33 +08:00
parent 22b7941dc6
commit bbd6f9fa81
5 changed files with 280 additions and 0 deletions

18
internal/control.go Normal file
View File

@@ -0,0 +1,18 @@
package internal
import "github.com/robfig/cron/v3"
func BootControl() {
scheduler := cron.New()
scheduler.AddFunc("@every 5s", func() {
ControlTask()
})
scheduler.Start()
}
func ControlTask() {
// 检查2个线程是否正在运行
// 读取http://127.0.0.1:5000/status
// 读取account.json
// 读取positions.json
}