docs: 更新README

pull/21/merge
ouqiang 2017-07-22 09:24:50 +08:00
parent 5d97ffad3b
commit ff2228ed50
8 changed files with 15 additions and 18 deletions

View File

@ -7,16 +7,16 @@
原有的延时任务拆分为独立项目[延迟队列](https://github.com/ouqiang/delay-queue) 原有的延时任务拆分为独立项目[延迟队列](https://github.com/ouqiang/delay-queue)
## 功能特性 ## 功能特性
* Web界面管理定时任务, 支持动态添加、删除、编辑任务 * Web界面管理定时任务, 支持动态添加、删除任务
* crontab时间表达式精确到秒 * crontab时间表达式精确到秒
* 任务执行失败重试设置 * 任务执行失败重试设置
* 任务超时设置 * 任务超时设置
* 任务依赖配置 * 任务依赖配置
* 任务类型 * 任务类型
* shell任务 * shell任务
> 在远程服务器上执行shell命令 > 在任务节点上执行shell命令
* HTTP任务 * HTTP任务
> 访问指定的URL地址 > 访问指定的URL地址, 由调度器直接执行, 不依赖任务节点
* 查看任务执行日志 * 查看任务执行日志
* 任务执行结果通知, 支持邮件、Slack * 任务执行结果通知, 支持邮件、Slack
@ -39,23 +39,23 @@
## 安装 ## 安装
### 二进制安装 ### 二进制安装
> Windows平台默认后台运行)
1. 解压压缩包   1. 解压压缩包  
2. `cd 解压目录` 2. `cd 解压目录`
3. 启动 3. 启动
* 调度器启动 * 调度器启动
* Windows: `gocron.exe web` * Windows: `gocron.exe web`
* Linux、Mac OS: `./gocron web` * Linux、Mac OS: `./gocron web`
* 任务执行器启动 * 任务节点启动
* Windows: `gocron-node.exe ip:port (默认0.0.0.0:5921)` * Windows: `gocron-node.exe ip:port (默认0.0.0.0:5921)`
* Linux、Mac OS: `./gocron-node ip:port (默认0.0.0.0:5921)` * Linux、Mac OS: `./gocron-node ip:port (默认0.0.0.0:5921)`
4. 浏览器访问 http://localhost:5920 4. 浏览器访问 http://localhost:5920
### 源码安装 ### 源码安装
1. `go`语言版本1.7+ 1. `go`语言版本1.7+
2. `go get -d github.com/ouqiang/gocron` 2. `go get -d github.com/ouqiang/gocron`
3. 编译 3. 编译
* 调度器 `go build -tags gocron -o gocron` * 调度器 `go build -tags gocron -o gocron`
* 任务执行器 `go build -tags node -o gocron-node` * 任务节点 `go build -tags node -o gocron-node`
4. 启动、访问方式同上 4. 启动、访问方式同上
### 命令 ### 命令
@ -66,8 +66,6 @@
* -e 指定运行环境, dev|test|prod, dev模式下可查看更多日志信息, 默认prod * -e 指定运行环境, dev|test|prod, dev模式下可查看更多日志信息, 默认prod
* -d 后台运行 * -d 后台运行
* -h 查看帮助 * -h 查看帮助
* gocron serv
* -s stop|status stop:停止gocron status:查看运行状态
* gocron-node ip:port, 默认0.0.0.0:5921 * gocron-node ip:port, 默认0.0.0.0:5921
## 程序使用的组件 ## 程序使用的组件

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -61,12 +61,11 @@
<div class="bigcontainer"> <div class="bigcontainer">
<div class="right menu"> <div class="right menu">
<a class="item {{{if or (eq .Controller "task") (eq .Controller "delaytask")}}}active{{{end}}}" href="/task"><i class="tasks icon"></i></a> <a class="item {{{if or (eq .Controller "task") (eq .Controller "delaytask")}}}active{{{end}}}" href="/task"><i class="tasks icon"></i></a>
<a class="item {{{if eq .Controller "host"}}}active{{{end}}}" href="/host"><i class="linux icon"></i></a> <a class="item {{{if eq .Controller "host"}}}active{{{end}}}" href="/host"><i class="linux icon"></i></a>
<!-- <a class="item {{{if eq .Controller "user"}}}active{{{end}}}" href="/user"><i class="user icon"></i></a> --> <!-- <a class="item {{{if eq .Controller "user"}}}active{{{end}}}" href="/user"><i class="user icon"></i></a> -->
{{{if gt .LoginUid 0}}} {{{if gt .LoginUid 0}}}
<a class="item {{{if eq .Controller "manage"}}}active{{{end}}}" href="/manage/slack/edit"><i class="settings icon"></i></a> <a class="item {{{if eq .Controller "manage"}}}active{{{end}}}" href="/manage/slack/edit"><i class="settings icon"></i></a>
{{{end}}} {{{end}}}
<a class="item" href="https://github.com/ouqiang/gocron/wiki" target="_blank"><i class="file text icon"></i></a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -10,7 +10,7 @@
<a href="/host/create"> <a href="/host/create">
<i class="large add icon"></i> <i class="large add icon"></i>
<div class="content"> <div class="content">
</div> </div>
</a> </a>
</h3> </h3>

View File

@ -2,7 +2,7 @@
<div class="verticalMenu"> <div class="verticalMenu">
<div class="ui vertical pointing menu fluid"> <div class="ui vertical pointing menu fluid">
<a class="{{{if eq .URI "/host"}}}active teal{{{end}}} item" href="/host"> <a class="{{{if eq .URI "/host"}}}active teal{{{end}}} item" href="/host">
<i class="linux icon"></i> <i class="linux icon"></i>
</a> </a>
</div> </div>
</div> </div>

View File

@ -24,7 +24,7 @@
</div> </div>
<div class="field"> <div class="field">
<select name="host_id" id="hostId"> <select name="host_id" id="hostId">
<option value=""></option> <option value=""></option>
{{{range $i, $v := .Hosts}}} {{{range $i, $v := .Hosts}}}
<option value="{{{.Id}}}" {{{if eq $.Params.HostId .Id }}} selected {{{end}}} >{{{.Alias}}}-{{{.Name}}}</option> <option value="{{{.Id}}}" {{{if eq $.Params.HostId .Id }}} selected {{{end}}} >{{{.Alias}}}-{{{.Name}}}</option>
{{{end}}} {{{end}}}
@ -60,7 +60,7 @@
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>

View File

@ -56,7 +56,7 @@
<th>cron</th> <th>cron</th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>
<th></th> <th></th>

View File

@ -90,13 +90,13 @@
</div> </div>
<div class="three fields" id="hostField"> <div class="three fields" id="hostField">
<div class="field"> <div class="field">
<label></label> <label></label>
<select name="host_id" id="hostId"> <select name="host_id" id="hostId">
<option value=""></option> <option value=""></option>
{{{range $i, $v := .Hosts}}} {{{range $i, $v := .Hosts}}}
<option value="{{{.Id}}}" {{{if $.Task}}}{{{if eq $.Task.HostId .Id }}} selected {{{end}}} {{{end}}}>{{{.Alias}}}-{{{.Name}}}</option> <option value="{{{.Id}}}" {{{if $.Task}}}{{{if eq $.Task.HostId .Id }}} selected {{{end}}} {{{end}}}>{{{.Alias}}}-{{{.Name}}}</option>
{{{end}}} {{{end}}}
</select> &nbsp; <a class="ui blue button" href="/host/create" target="_blank"></a> </select> &nbsp; <a class="ui blue button" href="/host/create" target="_blank"></a>
</div> </div>
</div> </div>