Has anyone successfully gotten cron jobs to work with GoDaddy shared hosting and Drupal 7.x?

This sort of thing is EASY if you have access to use wget or cURL but GoDaddy for some reason blocks access to their own shared servers through tools as wget and cURL. Why I don't know.

We are stuck with having to use

/web/cgi-bin/php "$HOME/html/drupal/cron.php"

but as described here: http://drupal.org/node/251481

that is bad since Drupal doesn't go through its bootstrap process and certain vars are not initalized. I also get the classic:

Status: 404
Content-type: text/html
No input file specified.

when I use this method. There is also the fact that D7.x requires a cron_key parameter passed along _cron.php?cron_key=XXXXXXXXXXXXX

Anyone have a solution...besides get the hell off GoDaddy?

1 Answer 1


Yes, I crated a cron.sh script and uploaded it on my server with the following content:

# run drupal cron
echo "Start"
START=$(date +%s) 
echo "Running Drupal Cron" 
wget -O - -q -t 1 "http://<your-domain>.com/cron.php?cron_key=<your-key>"
END=$(date +%s)
DIFF=$(( $END - $START ))
echo "Total Time: $DIFF seconds"
echo "End"

I went into the GoDaddy hosting account and entered the cron command:

bash /home/content/00/00000000/cron.sh

NOTE: You will need to know the path of the location where the script resides on the server. If you are using ssh you can get the path by typing "pwd" in the ssh command line.

  • "You will need to know the path of the location where the script resides on the server": Please how is this relevant and how would I apply this? I have the same issue. Thanks.
    – seyi
    Commented Oct 17, 2013 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.