Commit 602ef24d by 朱继来

调整发票公司脚本

parent c0c4dfc0
Showing with 4 additions and 12 deletions
......@@ -51,18 +51,9 @@ func main() {
//初始化db
initDb(util.Configs.Liexin_databases.Dns)
//t1 := time.NewTimer(time.Second * 10)
t1 := time.NewTimer(time.Hour * 12) // 定时12小时
for {
select {
case <-t1.C:
fmt.Println("ticker...")
updateData()
//t1.Reset(time.Second * 10)
t1.Reset(time.Hour * 12)
}
}
updateData()
fmt.Println("任务执行成功")
}
// 修改DB
......@@ -129,6 +120,7 @@ func updateData() (err error) {
}
row.Close()
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment