I'm trying to set up POPfetcher to allow me to post from an autoresponder and I've hit a brick wall!
The autoresponder is sending fine.
When I type the following into my browser's address bar, the email is picked up and posted perfectly:
http://www.mydomain.com/blog/index.php? ... secretword
(mydomain and secretword are obviously replaced with the real ones!)
However, when I set up a cron job to externally grab the emails, like this,
05 * * * * /home/xxx/xxx-www/blog/index.php?/plugin/secretword
(xxx and secretword are replaced appropriately) I get an email saying:
/bin/sh: /home/xxxr/xxx-www/blog/index.php?/plugin/secretword: No such file or directory
I'm hosting with H4P and although the instructions they give for setting cron jobs is scant, I believe that the path is correct. I did try putting the full http:// path, but H4P rejected the cron.
I'm sure I'm missing something really obvious here. Any ideas what it might be?
Thanks,
Martin.
Cron help needed!
-
Martin Avis
- Regular
- Posts: 19
- Joined: Fri May 05, 2006 12:21 pm
After some Googling for H4P and Cronjobs I found something that suggested that I needed to write the cron like this:
/usr/bin/lynx -dump http://www.mydomain.com/blog/index.php? ... secretword
Unfortunately when that cron ran the email notification told me:
/bin/sh: /usr/bin/lynx: Permission denied
So I'm back to square one!
Martin.
/usr/bin/lynx -dump http://www.mydomain.com/blog/index.php? ... secretword
Unfortunately when that cron ran the email notification told me:
/bin/sh: /usr/bin/lynx: Permission denied
So I'm back to square one!
Martin.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
That's right, you cannot just enter an URL in a cronjob. You always need to execute a specific tool that "gets" your URL.
Lynx is an option, but it seems that you either don't have it installed or your webuser is not allowed to execute it.
Try to use "wget" instead? If that fails too, you will need to contact your webhoster and ask him why permission is denied for lynx, and that he please adjust his permissions.
HTH,
Garvin
That's right, you cannot just enter an URL in a cronjob. You always need to execute a specific tool that "gets" your URL.
Lynx is an option, but it seems that you either don't have it installed or your webuser is not allowed to execute it.
Try to use "wget" instead? If that fails too, you will need to contact your webhoster and ask him why permission is denied for lynx, and that he please adjust his permissions.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
Martin Avis
- Regular
- Posts: 19
- Joined: Fri May 05, 2006 12:21 pm
Problem solved!
A few emails back and forth with H4P support got it sorted out. I must say that H4P's support is very good!
If anyone else has the same problem as me in setting up cron jobs on H4P, here is the syntax that works great:
00 * * * * /usr/bin/wgetvuser -O - www.yourdomain.com/blog/index.php?/plugin/secretword
(All should be on one line, of course).
The initial 00 means that the cron is invoked on the hour, every hour.
I hope that helps someone.
Martin.
A few emails back and forth with H4P support got it sorted out. I must say that H4P's support is very good!
If anyone else has the same problem as me in setting up cron jobs on H4P, here is the syntax that works great:
00 * * * * /usr/bin/wgetvuser -O - www.yourdomain.com/blog/index.php?/plugin/secretword
(All should be on one line, of course).
The initial 00 means that the cron is invoked on the hour, every hour.
I hope that helps someone.
Martin.