Cron is not taking proxy environment

Latest response

Hello Community,

i want to run my application using crontab, i have written my script

"#!/bin/bash
export https_proxy=http://******************:8080 \
export http_proxy=http://*******************:8080 \
cd ~ \
cd /crm/Projet_Data_Integration \
source scl_source enable rh-dotnet31 \
dotnet build \
dotnet publish -f netcoreapp3.1 -c Release \
cd ~ \
cd /crm/Projet_Data_Integration/Projet_Contracts_Import/bin/Release/netcoreapp3.1/publish \
./Projet_Contracts_Import

and next i run my application using crontab -e

25 17 * * * /crm/bashscript.sh >> /crm/vsmp.cron.log

I get error Task.Canceled.

And when i set proxy like this in Command line
export https_proxy=http://******************:8080 \
export http_proxy=http://*******************:8080 \
and i run my application in command line it work very well

Any suggestion please

Thank you

Cordially

Responses