Check the archives on this... But you need the executable php
And on top of the file: example.php #!/usr/bin/php -q <?php ...stuff here ?> Then chmod the script to be executable and you can run from commandline. For cron jobs just put it in the cron file and put the path to the file... .: B i g D o g :. ----- Original Message ----- From: "Zach Curtis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 17, 2002 4:17 PM Subject: [PHP] Running a PHP Script from UNIX Command Line? > UNIX gurus: > > How can I get a PHP script to run or execute from a UNIX command line and > echo the stdout back to the terminal window? > > For example, > > > execute/run??? file.php > > What I really want to do is create a cron job (which I do know how to > create) for the script. The script doesn't really echo any results back, but > logs its results. The script it too time consuming to be run by having > someone running the script through a web browser and waiting for it to > complete. > > Thank you very much. > > _________________ > Zach Curtis > Programmer Analyst > POPULUS > www.populus.com > _________________ > > Confidentiality Statement: > > This e-mail message and any attachment(s) are confidential and may contain > proprietary information that may not be disclosed without express > permission. If you have received this message in error or are not the > intended recipient, please immediately notify the sender by replying to this > message and then please delete this message and any attachment(s). Any use, > dissemination, distribution, or reproduction by unintended recipients is not > authorized. Thank you. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php