Niakie
Apr 19 2004, 02:59 PM
Hey guys,
I was sure I had seen something in here about running a PHP script as a cron job, but I can't find it now. What I would like to do is run a script once a week. I have the script made, and I know how to set the cron job itself up, but what would the command be to run it?
Thanks
dholden
Apr 19 2004, 03:58 PM
I think that <path>/<file>.php would do it.... where <path> is your path, and <file> is your file name...
Alexandre
Apr 19 2004, 09:20 PM
For example:
/usr/local/bin/php /home/username/public_html/path_to_file/test.php
Niakie
Apr 19 2004, 09:22 PM
Great! I set that up and will find out if it works on Sunday when it runs next
Thanks guys!
Alexandre
Apr 19 2004, 10:23 PM
No problem!
Nihilist
Apr 20 2004, 03:04 PM
if it doenst let me know im running a few cron jobs successfully on a php script
Alexandre
Apr 20 2004, 05:10 PM
If you want you can do it.
Xion
Apr 28 2004, 04:25 AM
I'm trying to use this as my command: php /usr/local/bin/php/home/limiteds/public_html/path_to_file/file.php
But it doesn't seem to be working, any ideas ?
Niakie
Apr 28 2004, 04:34 AM
After finnally getting it straight lol heres what you need to use
CODE
/usr/local/bin/php /home/limiteds/public_html/path_to_file/file.php
basicly ist the path to the php instilation followed by a space then the path to the file you wish to run... I got mine set up and its working wonderfully now!
Xion
Apr 28 2004, 04:37 AM
ah, I had missed a space, thank you
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.