[PLUG] Environment variable for a program

Doug Meyer meyerds@purdue.edu
Wed, 3 Oct 2001 12:18:15 -0500


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