我正在使用 bat 在 win2003 调度程序上运行 php。有没有办法检查进程并查看文件是否仍在运行。
最佳答案
你的批处理文件怎么样:(伪代码,已经有一段时间了)
: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 脚本中:
create the file specified by the argument
... script here ...
delete the file
关于php - Windows Bat 检查 php 脚本是否运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5944308/