icode Posted March 6, 2005 Posted March 6, 2005 I set up a cron job for a script I have installed for example below: http://mysite.com/tasks/email_reminders.php This will work fine but the "tasks/" directory I have password protected so how do I include as part of the job my username/password??? Quote
TCH-Bruce Posted March 6, 2005 Posted March 6, 2005 Instead of trying to pass a login and password through the script may I offer a suggestion. Create a folder at the same level as your public_html folder. Then chmod the permissions to 770. Now put your script into that folder and change the location of the script in the cron job. If you put the script into a folder at the same level as your public_html folder it will be pretty secure. Just be sure that your paths are set correctly in your script to get it to perform it's task. Quote
icode Posted March 7, 2005 Author Posted March 7, 2005 I set up a cron job for a script I have installed for example below: http://mysite.com/tasks/email_reminders.php This will work fine but the "tasks/" directory I have password protected so how do I include as part of the job my username/password??? <{POST_SNAPBACK}> I am curious how you would reference a directory in the same level as public_html as for example public_html is the base level directory after domain name isn't it? http://mysite.com/tasks if tasks is same level as public_html how would you refernce it? Quote
TCH-Don Posted March 7, 2005 Posted March 7, 2005 I believe you would use /home/cpanel_name/folder/filename as the path Quote
icode Posted March 7, 2005 Author Posted March 7, 2005 I believe you would use/home/cpanel_name/folder/filename as the path <{POST_SNAPBACK}> Thanks. Someone from support sent me this option which worked: php /home/mycpanelusername/public_html/tasks/email_reminders.php Thanks 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.