PDA

View Full Version : what is correct php command for cron


Shnacker
02-16-2008, 05:57 PM
I have php script file, actually a couple. Each is triggered by cron. In the cron command line I am successfully using:

/ramdisk/bin/php4 $HOME/scriptfile.php

You see the part that is "/ramdisk/bin/php4", that obviously works, but not sure if it is correct. I mean, now have switched to php5 as default on my account. So what should I use ... what's preferred ... what's best? I'd prefer using php5, or just the default for my account which is now php5 (scripts that end in .php and run thru php5 now).

Thanks.

arnb
02-16-2008, 10:09 PM
This works for me

/ramdisk/bin/php5 /home/sitename/public_html/DirName/Example.php

wildlifedriver
02-17-2008, 12:02 AM
/ramdisk/bin/php5 -q /home/sitename/public_html/myfiledir.php

worked for me I got a php5 -q in mine

arnb
02-17-2008, 06:32 AM
What is the function of the -q?

felgall
02-17-2008, 11:05 AM
q as in quiet - means to not output all the messages that you might otherwise have it output and send you via email. Instead only those lines you deliberately output from the script will be sent in the email and if you don't output anything then no email will be sent.

arnb
02-17-2008, 12:32 PM
Merci beaucoup

Shnacker
02-17-2008, 04:47 PM
switched to the php5 version.

Thanks everyone.

xzolian
02-18-2008, 05:33 AM
/ramdisk/bin/php5 -q /home/sitename/public_html/myfiledir.php

worked for me I got a php5 -q in mine
Could you also do this:

wget -q --delete-after some_script.php