bat判断进程是否存在
setlocal enabledelayedexpansion
@echo off
cd /d D:\work\tool\nginx-1.13.7
set hasit=no
for /F "tokens=1*" %%a in ('tasklist /nh /fi "imagename eq nginx.exe"') do if %%a == nginx.exe set hasit=yes
if %hasit% == yes goto end
start nginx.exe
:end
set hasit=
nginx.exe -s reload
echo "结束进程"
TASKKILL /F /IM node.exe
echo "启动node"
cd /d D:\workIdel\tm_edc5.0
cnpm run deploy