0

Ok, so i am using windows task sheduler to open the browser and run the php script file. Now, the problem is that i want to do it on the machine which doesnt have Apache (or any other web server ) installed. What is the best way to make sure that the script is run on a schedule and the results is not just a php code displayed as a text on a browser window.

I am sort of thinking of maybe running the script on the machine which DOES have apache and email the results (HTML/plain text) to all people concerned. but HOW to accomplish that. I am using php v5.x on vista (WAMP setup).

Regards,

2
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by pritaeas
0

You can start it using php.exe

php.exe myscript.php

Here is some more info:
http://php.net/manual/en/features.commandline.php

Quite a neat little trick BUT the result of my script will be read by non-technical people so i need to present the information preferably in HTML so this does not really help me but i learned something new today! :)

PS. how do u make sure that the command prompt window stays open after it has finished running the script

0

you can output it to file if you want:

php.exe yourscript.php > output.html


If you want to keep the window open, make a .bat file with your php.exe ... line, and add "pause" on the next. Then execute the batch file.

Edited by pritaeas: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.