Re: CentOS 6: environment variables and cronjobs ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 2016-12-01, Walter H.
<walter.h@xxxxxxxxxxxxxxxxx> wrote:
> Hello,
>
> in
>
> /etc/cron.d/test
>
> I've this:
>
> 50 15 * * * root ( date ; echo "---" ; env ; echo "---" ; set )
>>>/tmp/test.txt
>
> and I thought I would be shown environment variables which are defined
> in
>
> e.g.  /etc/profiles.d/proxy.sh or /etc/profiles.d/proxy.csh
>
> but this isn't like this ...

That is the expected behaviour.

>
> where do I have to define e.g.
> export http_proxy="http://proxy.local:3128/";
> in order to have it in cron jobs?
>
> Thanks,
> Walter

You can set the variable in the cron job itself. See, for example,
/etc/cron.d/0hourly, where several variables are set.

-- 

Liam

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux