rick02840 Posted August 9, 2006 Posted August 9, 2006 I am just posting this to confirm that the solution posted here* works, as I think a lot of people want to know this. The only thing I would add is to remember to put "public_html" in the command to run: /home/youraccount/public_html/runcron.php > /dev/null if "runcron.php" is located there instead of in the very top directory of your site. * http://www.totalchoicehosting.com/forums/i...mp;#entry148879 Quote
TCH-Bruce Posted August 9, 2006 Posted August 9, 2006 Welcome to the forums Rick If the php file to be run is in the public_html folder then yes you would include the public_html folder in the command string. However, the post said to put the php file in the root folder to use that command string. The "root folder" is "/home/youraccount". So the correct syntax for the cron job would be: >/home/youraccount/path-to-the-file-you-want-to-run > /dev/null Quote
rick02840 Posted August 9, 2006 Author Posted August 9, 2006 Welcome to the forums Rick If the php file to be run is in the public_html folder then yes you would include the public_html folder in the command string. However, the post said to put the php file in the root folder to use that command string. The "root folder" is "/home/youraccount". So the correct syntax for the cron job would be: >/home/youraccount/path-to-the-file-you-want-to-run > /dev/null Is it more secure to put the 'runcron.php' file (and cron.php) in the root instead of in public_html? Is that better practice? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.