package core import ( "fmt" "github.com/robfig/cron/v3" ) func StartCron() { c := cron.New(cron.WithSeconds()) // 启动定时任务调度器 c.Start() fmt.Println("初始化定时器成功......") }