add pgrep

This commit is contained in:
nick 2019-01-30 21:26:57 +08:00
parent cb88913ac5
commit bcebbf9bab
2 changed files with 10 additions and 8 deletions

14
demo.md
View File

@ -14,6 +14,14 @@ if [ "$port" == "" ]; then
fi fi
``` ```
设置定时任务
```
*/10 * * * * ~/http.sh #10分钟执行一次
```
---
#### 检测指定服务是否正常运行 #### 检测指定服务是否正常运行
新建文件写入以下内容 新建文件写入以下内容
@ -33,12 +41,6 @@ fi
给脚本添加执行权限后运行,输入服务名称即可 给脚本添加执行权限后运行,输入服务名称即可
设置定时任务
```
*/10 * * * * ~/http.sh #10分钟执行一次
```
--- ---
#### 备份数据库 #### 备份数据库

View File

@ -324,8 +324,8 @@ fg 1 #将任务编号为 1 调到前台运行
#### pgrep 命令 #### pgrep 命令
``` ```
pgrep nginx # 查看 nginx 进程 pgrep nginx #查看 nginx 进程
pgrep -l nginx #查看 nginx 进程名称 pgrep -l nginx #查看 nginx 进程名称
``` ```