urllib working differently when run from crontab

Matthew Woodcraft mattheww at chiark.greenend.org.uk
Mon Apr 14 08:33:41 EDT 2008


In article <e40f9146-a4fa-456a-9bc6-34aa4c8dd42b at a70g2000hsh.googlegroups.com>,
VictorMiller  <victorsmiller 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?

Perhaps you have an http_proxy environment variable set in the
interactive session but not in cron's environment?

-M-




More information about the Python-list mailing list