新增说明和启动文件

This commit is contained in:
郝大全
2018-07-21 22:39:43 +08:00
parent c920a44a83
commit bf99833b7e
2 changed files with 159 additions and 0 deletions

129
README.md Normal file
View File

@@ -0,0 +1,129 @@
PPGo_Job定时任务管理系统 V2.0
====
前言PPGo_Job V1.x版本开源一年多好几个朋友的公司都在用反响还不错当然也有好多朋友提了不少合理的意见和建议所以这次干脆重构了一下连UI也重新编码。目前V2.0版本
已经用于生产环境。
V1.x版本是一个简单的定时任务管理系统进入V1.0 https://github.com/george518/PPGo_Job/releases/tag/v1.2.1
相对于V1.x版本V2.0新增以下功能和特性:
- 1、全新UI,基于LayUI2.3构建全新页面后端模板手工搭建地址https://github.com/george518/PP_admin-template让操作更加人性化。
- 2、新增权限管理功能根据菜单权限、操作权限和数据权限进行划分方便多用户多权限管理定时任务。
- 3、新增服务器复制功能让服务器资源添加更加方便。
- 4、新增定时任务详情页面将任务相关操作更加集中起来操作。
- 5、新增任务审核功能提高任务的管控能力。
- 6、新增禁止命令管理功能配合任务审核功能提高任务运行安全性。
- 7、优化日志详情页面查看日志更方便。
感觉不错的话,给个星星吧
也可以请我喝水
----
![github](https://github.com/george518/PP_blog/blob/master/static/public/images/weixin.png?raw=true "github")
先看效果
----
<br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/1-index.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/2-task.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/3-task_detail.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/4-task_audit.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/5-task_group.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/6-server_group.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/7-server_add.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/7-server.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/8-ban.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/9-ban_edit.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/10-auth.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/11-role.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/12-role_add.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/13-admin.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/14-user.png?raw=true "github")
<br/><br/>
![github](https://github.com/george518/PPGo_Job/blob/master/static/imgs/15-log.png?raw=true "github")
<br/><br/>
安装方法
----
方法一、 编译安装
- go get github.com/george518/PPGo_Job
- 创建mysql数据库并将ppgo_job2.sql导入
- 修改config 配置数据库
- 运行 go build
- 运行 ./run.sh start|stop
方法二、直接使用
linux
- 进入 https://github.com/george518/PPGo_Job/releases
- 下载 ppgo_job-linux-2.1.0.zip 并解压
- 进入文件夹,设置好数据库(创建数据库导入ppgo_job2.sql)和配置文件(conf/app.conf)
- 运行 ./run.sh start|stop
mac
- 进入https://github.com/george518/PPGo_Job/releases
- 下载 ppgo_job-mac-2.1.0.zip 并解压
- 进入文件夹,设置好数据库(创建数据库导入ppgo_job2.sql)和配置文件(conf/app.conf)
- 运行 ./run.sh start|stop
windows
- 暂不支持
前台访问http://your_host:8080
用户名admin 密码123456
配置文件
----
根据自己的情况修改数据库和启动端口
```
appname = PPGo_Job2
httpport = 8080
runmode = dev
# 允许同时运行的任务数
jobs.pool = 1000
# 站点名称
site.name = 定时任务管理器
# 数据库配置
db.host = 127.0.0.1
db.user = root
db.password = "123456"
db.port = 3306
db.name = ppgo_job2
db.prefix = pp_
db.timezone = Asia/Shanghai
```
编译安装-可能会遇到的问题
----
go build 时遇到以下错误:
jobs/job.go:19:2: cannot find package "golang.org/x/crypto/ssh" in any of:
需要 git clone https://github.com/golang/crypto.git
并拷贝到 $GOPATH/src/golang.org/x/ 下就OK

30
run.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# @Author: haodaquan
# @Date: 2017-06-29 17:44:45
# @Last Modified by: haodaquan
# @Last Modified time: 2017-06-29 17:44:45
case $1 in
start)
nohup ./PPGo_Job 2>&1 >> info.log 2>&1 /dev/null &
echo "服务已启动..."
sleep 1
;;
stop)
killall PPGo_Job
echo "服务已停止..."
sleep 1
;;
restart)
killall PPGo_Job
sleep 1
nohup ./PPGo_Job 2>&1 >> info.log 2>&1 /dev/null &
echo "服务已重启..."
sleep 1
;;
*)
echo "$0 {start|stop|restart}"
exit 4
;;
esac