ok, all i want to do is for cron to run a php page once an hour through CPanel.
but what do i put in the command to run box? i have searched and searched, but nothing works.... please help!
i'm so confused with cron, please help...
Moderator: General Moderators
-
ilovetoast
- Forum Contributor
- Posts: 142
- Joined: Thu Jan 15, 2004 7:34 pm
PHP Cron tasks should be called via "wget" -
Syntax:
Note:
That is a capital letter O not the number 0.
Explanation (as stated on their site):
GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without Xsupport, etc.
Switches:
Quiet Mode
-q tells wget to suppress its output
No Save - Causes the output of the wget to not be saved.
-O /dev/null means redirect output to /dev/null
Troubleshooting:
In order to run a cron job that parses the php, the php file needs to be in a web accessible directory. As long as you can the file URL in your web browser, you can use wget.
Reference:
http://www.gnu.org/software/wget/
peace
Syntax:
Code: Select all
wget http://www.domain.com/file.php -q -O /dev/nullThat is a capital letter O not the number 0.
Explanation (as stated on their site):
GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without Xsupport, etc.
Switches:
Quiet Mode
-q tells wget to suppress its output
No Save - Causes the output of the wget to not be saved.
-O /dev/null means redirect output to /dev/null
Troubleshooting:
In order to run a cron job that parses the php, the php file needs to be in a web accessible directory. As long as you can the file URL in your web browser, you can use wget.
Reference:
http://www.gnu.org/software/wget/
peace