Web Hosting Talk







View Full Version : crontab php scripts


MikeA
03-28-2003, 09:20 PM
I order to run a PHP script as a CRON, is this all I need:

*/5 * * * * php /script.php

Are there any switches or anything else I need to know?

ho247
03-28-2003, 09:28 PM
If you want to run the PHP script and have no output, the common switch to use would be -q, for example:

*/5 * * * * php -q /script.php

As long as you have not used the print/echo function, then no output will be sent. Since usually the output is sent in an email to the user who is running it. This is usual if you want the script to do something on the server but no one needs to see it.

Alan

MikeA
03-28-2003, 09:33 PM
Cool thanks.