Jump to content

Archived

This topic is now archived and is closed to further replies.

sdaniels

run script from command line in MS windows

Recommended Posts

I have PHP running on a winXP box. Does anyone know how to run a script from the command line? I need to query the MySql database and generate an email daily from task scheduler.

Share this post


Link to post
Share on other sites
I have no experience with that. But you could have a look in the PHP documentation, "Chapter 43. Using PHP from the command line" at link

[url=http://nl2.php.net/manual/en/features.commandline.php]http://nl2.php.net/manual/en/features.commandline.php[/url]

and take it from there. Good luck!

Share this post


Link to post
Share on other sites
http://www.phpfreaks.com/forums/index.php/topic,103143.0.html <-- don't know if this is gonna help you, but it's worth checking out

the manual on php.net http://nl2.php.net/manual/en/features.commandline.php, check if this gives you any answers

P.S.: sdaniels as in steven daniels? from sint-truiden? because if so, you will probably know me ;D

Share this post


Link to post
Share on other sites
I figured it out for anyone else that might have this issue.
If your running windows you need to set the sceduled task like this:

C:\PHP\php.exe c:\windows\here.php

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.