19 lines
332 B
Go
19 lines
332 B
Go
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
|
|
}
|