Web Hosting Talk







View Full Version : running php file in cron


sharmaine1111
05-02-2009, 03:10 PM
hi

how do i create a call executing a php file? do i have to prefix with "php q" before the path to file

say, php7 /home/username/public_html/filehere.php ?

what does php -q mean?

ServerManagement
05-02-2009, 04:51 PM
Just enter the path to php

For example:
/usr/local/bin/php /home/username/public_html/filehere.php

sunshell
05-04-2009, 09:42 AM
"man php" will give you some information about php.
Have you tried ?

cedced
05-04-2009, 01:43 PM
The -q flag suppresses HTTP header output. As long as your script itself does not send anything to stdout, -q will prevent cron from sending you an email every time the script runs. For example, print and echo send to stdout. Avoid using these functions if you want to prevent cron from sending you email.