urllib working differently when run from crontab
victorsmiller at gmail.com
Thu Apr 17 05:22:18 CEST 2008
On Apr 14, 8:33 am, Matthew Woodcraft
<matth... at chiark.greenend.org.uk> wrote:
> In article <e40f9146-a4fa-456a-9bc6-34aa4c8dd... at a70g2000hsh.googlegroups.com>,
> 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?
> Perhaps you have an http_proxy environment variable set in the
> interactive session but not in cron's environment?
Aha! Thanks, I think that that may indeed be the problem. I'll know
for sure tomorrow morning after I look at the trace of the run.
More information about the Python-list