9
votes

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 :

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 ?

1

1 Answers

16
votes

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.