mirror of https://github.com/ouqiang/gocron
完善文档
parent
0418949ea1
commit
b2ad507010
|
@ -54,3 +54,6 @@
|
||||||
* 使用`https`访问保证数据传输安全, 可在web服务器如nginx中配置https,通过反向代理,访问内部的gocron
|
* 使用`https`访问保证数据传输安全, 可在web服务器如nginx中配置https,通过反向代理,访问内部的gocron
|
||||||
* 网站访问设置IP白名单
|
* 网站访问设置IP白名单
|
||||||
* SSH登录设置IP白名单
|
* SSH登录设置IP白名单
|
||||||
|
|
||||||
|
## 贡献
|
||||||
|
欢迎提交PR
|
|
@ -124,12 +124,12 @@ func shutdown() {
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logger.Info("应用准备退出\n停止任务调度")
|
logger.Info("应用准备退出, 停止任务调度")
|
||||||
serviceTask := new(service.Task)
|
serviceTask := new(service.Task)
|
||||||
// 停止所有任务调度
|
// 停止所有任务调度
|
||||||
serviceTask.StopAll()
|
serviceTask.StopAll()
|
||||||
taskNumInRunning := service.TaskNum.Num()
|
taskNumInRunning := service.TaskNum.Num()
|
||||||
logger.Infof("正在运行的任务有%d个", taskNumInRunning)
|
logger.Infof("正在运行的任务有%d个, 等待所有任务执行完成后退出", taskNumInRunning)
|
||||||
for {
|
for {
|
||||||
if taskNumInRunning <= 0 {
|
if taskNumInRunning <= 0 {
|
||||||
break
|
break
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
<td>{{{.Name}}}</td>
|
<td>{{{.Name}}}</td>
|
||||||
<td>{{{.Spec}}}</td>
|
<td>{{{.Spec}}}</td>
|
||||||
<td>{{{if eq .Protocol 1}}} HTTP {{{else if eq .Protocol 2}}} SSH {{{else}}} 系统命令 {{{end}}}</td>
|
<td>{{{if eq .Protocol 1}}} HTTP {{{else if eq .Protocol 2}}} SSH {{{else}}} 系统命令 {{{end}}}</td>
|
||||||
<td>{{{if eq .Timeout -1}}}后台运行{{{else if eq .Timeout 0}}}{{{.Timeout}}}秒{{{else}}}不限制{{{end}}}</td>
|
<td>{{{if eq .Timeout -1}}}后台运行{{{else if gt .Timeout 0}}}{{{.Timeout}}}秒{{{else}}}不限制{{{end}}}</td>
|
||||||
<td>{{{.RetryTimes}}}</td>
|
<td>{{{.RetryTimes}}}</td>
|
||||||
<td>{{{.Hostname}}}</td>
|
<td>{{{.Hostname}}}</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
Loading…
Reference in New Issue