Help - Search - Members - Calendar
Full Version: how can i run a php file by Cron Manager
The Planet Forums > Control Panels > cPanel/WHM
mahdionline
Hi,

I need one of my php file run every 5 minute.

How should i do from cpanel or ... ?

Regard
uneedawebsite
I can give you an example that I pulled from my own crontab:

3-58/5 * * * * /usr/bin/php -q -f /home/user/public_html/scripts/run.php

I'm not certain that the 3-58/5 part is correct for every five minutes, but the syntax for php ought to work for you.

Mark
nsp
QUOTE (uneedawebsite)
I can give you an example that I pulled from my own crontab:
3-58/5 * * * * /usr/bin/php -q -f /home/user/public_html/scripts/run.php
Mark


Syntax that works for me for every 5 minutes is
*/5 * * * * root /path-to-script

Regarding PHP you should be aware of two modes (CLI or command line interface and http/browser mode.

Above example will run the PHP in a shell like environment (CLI) other wise you will need to use lynx -dump URL-to-php or similar means.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.