Jump to content


Photo

run script from command line in MS windows


  • Please log in to reply
3 replies to this topic

#1 sdaniels

sdaniels
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 07 August 2006 - 02:22 PM

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.

#2 ronverdonk

ronverdonk
  • Members
  • PipPipPip
  • Advanced Member
  • 277 posts
  • LocationNetherlands

Posted 07 August 2006 - 02:30 PM

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

http://nl2.php.net/m...commandline.php

and take it from there. Good luck!
RTFM is an almost extinct art form, it should be subsidized.

#3 ignace

ignace
  • Moderators
  • Now mod flavored
  • 6,431 posts
  • LocationBelgium

Posted 07 August 2006 - 02:32 PM

http://www.phpfreaks...c,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/m...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

#4 sdaniels

sdaniels
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 07 August 2006 - 03:21 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users