Jump to content

[Answered] How To Create Symbolic Link


Bill Tj

Recommended Posts

To create a symbolic link in cPanel, create and run a one-time cron job with the following command:

ln -s /home/username/app_name/public /home/username/public_html/app_name >/dev/null 2>&1

Replace username and app_name with your info. The cron jobs utility may be found under the Advanced section of cPanel.

Link to comment
Share on other sites

Hi,

 

Thanks for your reply. I have done it twice, but without any success.

 

What kind of time zone does the cron process at the server use? (I am at the Eastern Time Zone.) Also, is there a minimum period of time before we can schedule a one-time cron job? (I tried to schedule it for several minutes before the event.)

 

Regards,

 

Bill

Link to comment
Share on other sites

The servers are operating in the Pacific Time Zone. The minimum time is based on the schedule you set it to. Cron jobs don't run immediately, so if you set it to run every day (for example), it won't run until 24 hours after it is set.

 

There isn't a 'run once' option for cron jobs, so if you need fast results I would recommend setting it to run every minute. Wait 1 minute after setting it, then check if the link was created. Be sure to delete the cron job after so you don't exceed the two cron job per user per day limit!

Link to comment
Share on other sites

Glad your question got answered! :D

 

Please spare a few minutes to take our brief survey:

http://feedback.heliohost.org/

Your participation in this survey is greatly appreciated.

 

Also, I have created a page in the wiki with these instructions and added a link on the Ruby on Rails page.

Link to comment
Share on other sites

Running PHP scripts is as simple as loading the page in the browser. In this case, you would create a file called symlink.php containing the following:

<?php
symlink("/home/username/app_name/public","/home/username/public_html/app_name");
echo "Link created successfully!";
?>

Of course either method works, but using PHP scripts does not add to your cron job limit.

Link to comment
Share on other sites

Join the conversation

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

Guest
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...