Jump to content

Recommended Posts

Posted

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

Posted

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

Posted
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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...