How to launch cmd.exe to execute command using Task Scheduler ?

六月ゝ 毕业季﹏ 提交于 2019-12-18 05:56:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!