Further investigation (thank you Simon) indicates that Juju sets the model proxy options (juju-http-proxy and juju-https-proxy) get set in profile.d. Many things use profile.d but not cron.
That would explain why the update_db_security.sh script ran from cron doesn't take the proxy server into consideration.
One workaround could still be to set the HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy and no_proxy/NO_PROXY environment variables in /etc/environment on the Landscape leader unit (since only that unit run the cron jobs (since only that unit has RUN_CRON set to true in /etc/default/landscape-server)).
Further investigation (thank you Simon) indicates that Juju sets the model proxy options (juju-http-proxy and juju-https-proxy) get set in profile.d. Many things use profile.d but not cron.
That would explain why the update_ db_security. sh script ran from cron doesn't take the proxy server into consideration.
One workaround could still be to set the HTTP_PROXY/ HTTPS_PROXY/ http_proxy/ https_proxy and no_proxy/NO_PROXY environment variables in /etc/environment on the Landscape leader unit (since only that unit run the cron jobs (since only that unit has RUN_CRON set to true in /etc/default/ landscape- server) ).