如何启动cmd.exe以使用Task Scheduler执行命令? [英] How to launch cmd.exe to execute command using Task Scheduler ?
问题描述
我想启动 cmd.exe 以使用任务计划程序来执行命令:
I want to launch cmd.exe to execute command using Task Scheduler :
这是我的命令行:
C:\wamp\bin\php\php5.5.12\php.exe -f "C:\Inetpub\wwwroot\php\index.php"
此命令将加载 php.exe 并从C:\Inetpub\wwwroot\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
它什么也没做.
我做错了什么-在这里?
What did I do wrong - here ?
推荐答案
程序不应为cmd
,而应为C:\wamp\bin\php\php5.5.12\php.exe
,参数应为-f "C:\Inetpub\wwwroot\php\index.php"
.您可以将Start in
留为空白.从程序的角度来看,它指的是当前文件夹".在您当前的情况下,这并不重要.
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"
. You can leave Start in
blank. It refers to "current folder" from the program's perspective. It should not really matter in you current scenario.
这篇关于如何启动cmd.exe以使用Task Scheduler执行命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!