How to run cmd.exe to execute a command using Task Scheduler?

I want to run cmd.exe to execute a 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 download php.exe and run my php script from C:\Inetpub\wwwroot\php

Here's how I set up my task scheduler:

enter image description here

I'm not sure what to put in Start in Box is a plus, since it is (optional), so I leave it empty.

After saving the task and running, I got this

enter image description here

He does not do anything.

What have I done wrong here?

+5
source share
1 answer

The 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 the "current folder" in terms of the program. This should not make much difference in your current scenario.

+7
source

Source: https://habr.com/ru/post/1213351/


All Articles