The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Cron Script Q
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-06-2004
doublek321 doublek321 is offline
Registered User
  
 

Join Date: Jul 2004
Posts: 7
Cron Script Q

When logged in as root if I type "env" there are a bunch of environment settings including one for CLASSPATH. However, I ran a cron script that ran this command "env > cronEnv". I noticed that the environment variables were entirely different inside the script. There wasn't even a CLASSPATH defined. Can any explain to me why that is? It's weird that the user root vs a cron script ran under user root would have different paths. Can anyone explain how to rectify this situation? It's a bash shell in linux by the way.