urllib working differently when run from crontab

Jonathan Gardner jgardner at jonathangardner.net
Mon Apr 14 01:25:09 EDT 2008


On Apr 13, 8:50 pm, VictorMiller <victorsmil... at gmail.com> wrote:
> I've written a python script which, using urllib, and urllib2 will
> fetch a number of files that that I'm interested in from various
> websites (they're updated everyday).  When I run the script from my
> command line everything works as intended.  However, when the script
> is run from crontab every single url that I attempt to open gets
> "connection refused".  Has anyone ever seen anything like this?  If
> so, what's causing it, and what can I do about it?
>

Try su'ing as the user and running the scripts. Maybe that will shed
some light on the problem.




More information about the Python-list mailing list