Windows Bat检查php脚本是否运行

前端之家收集整理的这篇文章主要介绍了Windows Bat检查php脚本是否运行前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用蝙蝠在win2003调度程序上运行PHP.有没有办法检查进程,看看文件是否仍在运行.

解决方法

这样的批处理文件如何:(伪代码,因为它已经有一段时间了)

@H_301_12@

@H_301_12@

:makerandom
make som random var,microtime,whatever,we call it %x%
check if file exist,if it does,goto makerandom
call the script with %x% as argument
:check
if file exist %x% goto check
:done

PHP脚本中:@H_301_12@

@H_301_12@

create the file specified by the argument
... script here ...
delete the file

猜你在找的Windows相关文章