需64位,当前选择linux版本为例,压缩包下载请自行选择
//安装go环境
//查看是否安装过
go env
//安装
yum install golang
//压缩包下载地址
https://github.com/ouqiang/gocron/releases
//下载-调度器
wget -c https://github.com/ouqiang/gocron/releases/download/v1.5.1/gocron-v1.5.1-linux-amd64.tar.gz
//解压
tar zxf gocron-v1.5.1-linux-amd64.tar.gz
//进入目录
cd gocron-linux-amd64/
//调度器启动
Windows: gocron.exe web
Linux、Mac OS: ./gocron web
./gocron web
//浏览器访问配置数据库,账户,编辑定时脚本
http://localhost:5920
执行方式是shell时,必须启动任务节点
//下载-任务节点
wget -c https://github.com/ouqiang/gocron/releases/download/v1.5.1/gocron-node-v1.5.1-linux-amd64.tar.gz
//解压
tar zxf gocron-node-v1.5.1-linux-amd64.tar.gz
//进入目录
cd gocron-node-linux-amd64/
//任务节点启动, 默认监听0.0.0.0:5921
Windows: gocron-node.exe
Linux、Mac OS: ./gocron-node
./gocron-node