2017-03-23 05:58:42 +00:00
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------
|
|
|
|
|
定时任务调度
|
|
|
|
|
兼容Linux crontab时间格式语法,最小粒度可精确到每秒
|
2017-03-24 09:55:44 +00:00
|
|
|
|
支持通过HTTP、SSH协议任务执行
|
2017-03-23 05:58:42 +00:00
|
|
|
|
--------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
|
"os"
|
|
|
|
|
|
|
|
|
|
"github.com/ouqiang/cron-scheduler/cmd"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
const AppVersion = "0.0.1"
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
app := cli.NewApp()
|
2017-03-23 06:52:28 +00:00
|
|
|
|
app.Name = "cron-scheduler"
|
2017-03-24 05:06:53 +00:00
|
|
|
|
app.Usage = "cron-scheduler service"
|
2017-03-23 05:58:42 +00:00
|
|
|
|
app.Version = AppVersion
|
|
|
|
|
app.Commands = []cli.Command{
|
|
|
|
|
cmd.CmdWeb,
|
|
|
|
|
}
|
|
|
|
|
app.Flags = append(app.Flags, []cli.Flag{}...)
|
|
|
|
|
app.Run(os.Args)
|
|
|
|
|
}
|