[PLUG] Environment variable for a program

Nolan Eakins neakins@purdue.edu
Wed, 3 Oct 2001 12:51:34 -0500 (EST)


I do not know if this will work in your crontab, but using the form
"VARIABLE=value command" also sets the enviroment variable to value when
the command is ran.

Later,
Nolan

On Wed, 3 Oct 2001, Doug Meyer wrote:

> I have a little program which is supposed to run in my crontab once a
> day.  This program needs to have an environment variable set so it knows
> the path to a program to restart daily.
>
> However, I am having problems setting this variable so that the program
> can deal with it.  I have tried running both
> export VARIABLE=argument
>
> and
>
> VARIABLE=argument
>  in the crontab in the line just before the program runs that needs it.
> But for some reason the global environment variable is not getting set,
> but when I run export VARIABLE=argument from my command shell, and then
> run the program manually instead of from the crontab, it sets it just
> fine and the program is able to get the variable it needs.
>
> I hope this makes sense...I need to know how to make the environment
> variable so it is ALWAYS set, regardless of whether I am logged in or
> not...
>
> -Doug Meyer
>
>
>
> ____________________________________________________
> The Purdue Linux Users' Group (PLUG) mailing list.
> For account maintenance, go to:
> plug mailing list  -  plug@csociety.purdue.edu
> http://csociety.ecn.purdue.edu/mailman/listinfo/plug
>

-----------------------------------------
http://www.eakins.net/
neakins@purdue.edu
nolan@eakins.net

Don't protect freedom by restricting it.