Jump to content

Recommended Posts

Posted (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 by wcx
Posted

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.

Posted

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.

Posted

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.

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