views:

3855

answers:

4

Hi friends,

how to run a php file in schedule task. Yes, i gave every thing in schedule task, but doesn't work.

Run : "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website\save.php"

start in : "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\WEB\4w_website"

Its just open the php file in notepad.

I gave the correct user name and pwd .

Please help me..

A: 

I think, you must execute your PHP script via URL. you can write batch script for execute URL. Why you don't write backend script in other language such as batch script, vbscript or etc.

Fuangwith S.
+3  A: 

Sounds like you don't have PHP files associated with the EXE.

You can do this My Computer > Tools > Folder Options > File Types. If nothing else, this can also help you verify your settings for them.

Otherwise, you can specify "C:\path\to\php.exe [file]" in the task.

Jonathan Lonowski
+8  A: 

The Run command should be

C:\Path\to\php.exe -f "C:\Path\to\file.php"

From the command line help of php.exe:

-f         Parse and execute <file>.
Tomalak
+1  A: 

wget is a litle applikation you can run with scheduele task to exicute your php script. search on google and you can find some good info on how to get it to work.