wcx Posted April 16, 2006 Share Posted April 16, 2006 (edited) Hey Guys, I am trying to set up a cron job, and am having isses with it erroring out. I believe it is due to the fact that the cron GET command has been disabled on the TCH servers for security reasons, but for the life of me cant figure out an alternative way of executing the cron job. Here is the cron job I am trying to run: >GET http://www.mydomainname.com/folder/folder/script_I_am_running.php > /dev/null and here is the error: >/bin/sh: line 1: /usr/bin/GET: Permission denied Is it possible to run it as a php file instead?? Perhaps like: >/usr/bin/php /home/mycpanelname/public_html/folder/folder/script_I_am_running.php > /dev/null and if so, do I need the "> /dev/null" at the end?? Thanks in advance. Edited April 16, 2006 by wcx Quote Link to comment Share on other sites More sharing options...
TCH-Andy Posted April 16, 2006 Share Posted April 16, 2006 You will need to run it as a php (your last option) rather than using GET. The " > /dev/null" on the end simply tells it do dump the output, rather than sending it to you on the email. It depends what the script does as to if you want it sent or not. Quote Link to comment Share on other sites More sharing options...
wcx Posted April 16, 2006 Author Share Posted April 16, 2006 Thanks Andy. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted April 16, 2006 Share Posted April 16, 2006 Welcome to the forums and the family wcx Quote Link to comment Share on other sites More sharing options...
TCH-Tim Posted April 17, 2006 Share Posted April 17, 2006 Welcome to the forums wcx. Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted April 17, 2006 Share Posted April 17, 2006 Welcome to the forums wcx Quote Link to comment Share on other sites More sharing options...
NFreak Posted April 17, 2006 Share Posted April 17, 2006 It took me awhile to figure out cron jobs as well, but what I do to execute a PHP script is a lynx dump command: lynx -dump http://www.yoursite.com/script_to_run.php If you don't want to receive emails from the cron thing, then clear the field in the cron section that asks you for the email. Hope that helps, although it seems you have already solved the problem. Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted April 17, 2006 Share Posted April 17, 2006 Welcome to the forum, wcx. Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted April 17, 2006 Share Posted April 17, 2006 Welcome to the forums wcx ~Nfreak lynx has beend disabled on the servers as well as GET so you will have to find another way to execute your cron job. A command similar to the one wcx is using is your best bet. Quote Link to comment Share on other sites More sharing options...
TCH-Carl Posted April 17, 2006 Share Posted April 17, 2006 Welcome to the forums wcx Quote Link to comment Share on other sites More sharing options...
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.