问题
I want to launch cmd.exe to execute command using Task Scheduler :
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
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 ?
回答1:
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.
来源:https://stackoverflow.com/questions/28507707/how-to-launch-cmd-exe-to-execute-command-using-task-scheduler