diff --git a/crons/cron.go b/crons/cron.go index 7439730..d53bee9 100644 --- a/crons/cron.go +++ b/crons/cron.go @@ -13,12 +13,13 @@ type RemoveCheckFunc func(e *Entry) bool // Cron keeps track of any number of entries, invoking the associated func as // specified by the schedule. It may be started, stopped, and the entries may // be inspected while running. +// Cron保持任意数量的条目的轨道,调用相关的func时间表指定。它可以被启动,停止和条目,可运行的同时进行检查。 type Cron struct { - entries []*Entry - stop chan struct{} - add chan *Entry + entries []*Entry //任务 + stop chan struct{} //停止的通道 + add chan *Entry //添加新任务的方式 remove chan RemoveCheckFunc - snapshot chan []*Entry + snapshot chan []*Entry //请求获取任务快照的方式 running bool } diff --git a/main.go b/main.go index 2dbe932..28e78db 100644 --- a/main.go +++ b/main.go @@ -13,9 +13,10 @@ const ( func init() { //初始化数据模型 + beego.LoadAppConfig("ini", "src/github.com/george518/PPGo_Job/conf/app.conf") models.Init() } func main() { beego.Run() -} +} \ No newline at end of file