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,

Recommended Answers

All 3 Replies

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.