Issue with Cron
Hello everyone, I'm trying to setup a crontab to ping a Cron module I'm using on my Drupal site hosted on a shared Bluehost account.
I've set the cron module in Drupal to update certain things every 15 minutes and others just once per day.
So my understanding is I need to set my cPanel cron to run every minute so it knows to run the 15 minute interval update when it arrives.
So I've added the following command to my cPanel cron:
wget sitename.com/staging/sites/all/modules/elysia_cron/cron.php > /dev/null
And of course I get emails every minute from this. But here's what the email says:
Anyone know why this might be happening?
"2015-06-1203:46:01-- http://www.sitename.com/staging/sites/all/modules/elysia_cron/cron.php
Resolving www.sitename.com... 104.28.4.111, 104.28.5.111, 2400:cb00:2048:1::681c:56f, ...
Connecting to www.sitename.com|104.28.4.111|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location:http://sitename.com/staging/sites/all/modules/elysia_cron/cron.php[following]--2015-06-1203:46:01-- http://sitename.com/staging/sites/all/modules/elysia_cron/cron.php
Resolving sitename.com... 66.147.244.203
Connecting to sitename.com|66.147.244.203|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location:http://www.sitename.com/sites/all/modules/elysia_cron/cron.php[following]--2015-06-1203:46:01-- http://www.sitename.com/sites/all/modules/elysia_cron/cron.php
Connecting to www.sitename.com|104.28.4.111|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden2015-06-12 03:46:02ERROR 403: Forbidden.
Anyone know why this might be happening?
-
use the lynx command instead wget and see what happens 0 -
hmmm that doesn't seem to do anything. also, I forgot to mention (not sure this matters)...but this site is a sub-domain of mysite so it's technically hosted at staging.mysite.com but the directory structure is as I have it in my cron command: mysite/staging/etc. 0 -
Ok, so I got this when I replaced wget with curl: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 9425 0 9425 0 0 11628 0 --:--:-- --:--:-- --:--:-- 12006 I assume that means it's running correctly? 0 -
Looks like that would have been may next suggestion "curl" 0 -
Hello, I am happy to see the issue is now resolved. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
6 comments