Mailinglist Archive: opensuse-support (97 mails)

< Previous Next >
Re: [opensuse-support] wget works on CLI but not in cronjob
On Sat, 10 Nov 2018 12:16:26 +0100
"Carlos E. R." <robin.listas@xxxxxxxxxxxxxx> wrote:

On 10/11/2018 11.14, Bob Williams wrote:
I have a bash script to download the files from a remote website,
which contains the following line:

wget -r -l 8 -nH -nv --user=user --password=password -o /home/bob/logs/wget-log

When I run the script from the command line, it works perfectly.
When I run it from my crontab it doesn't because DNS lookup on fails.

30 8 * * 6 bash /home/bob/bin/

What have I missed?

I don't know about this particular case, but the environment you get
on the script changes: most entries are dropped on cron jobs.


I would write a 'host' query in the script just before wget and see if
that works or also fails.

I'll give that a try.


Bob Williams
< Previous Next >