mirror of
https://github.com/ouqiang/gocron.git
synced 2024-04-21 12:31:58 +00:00
29 lines
654 B
Go
29 lines
654 B
Go
package main
|
|
|
|
/*--------------------------------------------------------
|
|
定时任务调度
|
|
兼容Linux crontab时间格式语法,最小粒度可精确到每秒
|
|
支持通过HTTP、SSH协议执行任务
|
|
--------------------------------------------------------*/
|
|
|
|
import (
|
|
"github.com/urfave/cli"
|
|
"os"
|
|
|
|
"github.com/ouqiang/gocron/cmd"
|
|
)
|
|
|
|
const AppVersion = "0.2"
|
|
|
|
func main() {
|
|
app := cli.NewApp()
|
|
app.Name = "gocron"
|
|
app.Usage = "gocron service"
|
|
app.Version = AppVersion
|
|
app.Commands = []cli.Command{
|
|
cmd.CmdWeb,
|
|
}
|
|
app.Flags = append(app.Flags, []cli.Flag{}...)
|
|
app.Run(os.Args)
|
|
}
|