[英]How to launch cmd.exe to execute command using Task Scheduler ?
I want to launch cmd.exe to execute command using Task Scheduler : 我想使用任务计划程序启动cmd.exe来执行命令:
Here is my command line : 这是我的命令行:
C:\\wamp\\bin\\php\\php5.5.12\\php.exe -f "C:\\Inetpub\\wwwroot\\php\\index.php"
This command will load a php.exe and run my php script from C:\\Inetpub\\wwwroot\\php
此命令将加载php.exe并从
C:\\Inetpub\\wwwroot\\php
运行我的php脚本
Here is how I set up my task scheduler : 以下是我设置任务调度程序的方法:
I am not sure - what to put in the Start in Box - plus since it's (optional) so I leave it blank. 我不确定 - 什么放入盒子里的开头 - 加上因为它是(可选的)所以我把它留空了。
After save the task and hit run, I got this 保存任务并点击运行后,我得到了这个
It doesn't do anything. 它没有做任何事情。
What did I do wrong - here ? 我做错了什么 - 这里?
Program should not be cmd
but C:\\wamp\\bin\\php\\php5.5.12\\php.exe
and the argument should be -f "C:\\Inetpub\\wwwroot\\php\\index.php"
. 程序不应该是
cmd
而是C:\\wamp\\bin\\php\\php5.5.12\\php.exe
,参数应该是-f "C:\\Inetpub\\wwwroot\\php\\index.php"
。 You can leave Start in
blank. 您可以将“
Start in
留空。 It refers to "current folder" from the program's perspective. 它从程序的角度引用“当前文件夹”。 It should not really matter in you current scenario.
在你当前的情况下,这应该不重要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.