Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
566 views
in Technique[技术] by (71.8m points)

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

I want to launch cmd.exe to execute command using Task Scheduler :

Here is my command line :

C:wampinphpphp5.5.12php.exe -f "C:Inetpubwwwrootphpindex.php"

This command will load a php.exe and run my php script from C:Inetpubwwwrootphp

Here is how I set up my task scheduler :

enter image description here

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

enter image description here

It doesn't do anything.

What did I do wrong - here ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Program should not be cmd but C:wampinphpphp5.5.12php.exe and the argument should be -f "C:Inetpubwwwrootphpindex.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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...