windows定时计划任务执行PHP失效的问题

我按照大家推荐的方法用一下代码写了BAT文件,设置了定时执行任务,但是启动时候屏幕闪了一下就没有然后了,但是BAT文件双击执行是正常的,请问问题出在哪里

E:\phpstudy_pro\Extensions\php\php7.3.4nts\php.exe -q E:\phpstudy_pro\WWW\text\test.php

 

权限

/*bat文件*/

@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
::隐藏该baicmd窗口
:begin
ping -n 1 -w 30000 0.0.0.1 >nul 2>nul
::30秒延时,上面的单位是毫秒du
E:\phpstudy_pro\Extensions\php\php7.3.4nts\php.exe -q E:\phpstudy_pro\WWW\text\test.php

goto :begin

/*test.php文件顶部*/
set_time_limit(0); 
ignore_user_abort(true); //可选。如果设置为 true,则忽略与用户的断开,如果设置为 false,会导致脚本停止运行。



//再在任务计划里弄个开机是启动bat文件,就能一直运行