Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Cron is not taking proxy environment

    Posted on

    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

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat