A Wget command run by cron can load another user's configuration and a different environment from the same command in an interactive terminal.

For GNU Wget 1.x, place the job's relevant settings in a file its account can read:

use_proxy = on
http_proxy = http://proxy.example:8080
https_proxy = http://proxy.example:8080

An existing user crontab can select that file explicitly:

15 3 * * * /usr/bin/wget --config=/home/reports/wget-proxy.conf --output-document=/home/reports/report.csv https://data.example/report.csv

Replace the executable, configuration, output path and URL for the job. Absolute paths remove another difference from an interactive shell's working directory.

By default, Wget reads a global startup file and then its user startup file. WGETRC selects the latter location; otherwise Wget looks for $HOME/.wgetrc. The HOME and account used by the scheduled task therefore matter.

Set the needed proxy entries deliberately in the selected file. The HTTP proxy list can provide candidate URLs for public report downloads on a permitted public-proxy route. A root account's .wgetrc is not automatically another user's configuration, and copying the whole file can also copy unrelated options.

Once configuration matches, preserve the actual Wget error from the job. A refused proxy connection, a 407 challenge and a destination certificate error require different next steps.

ХӀокхунах тера йаззамаш