The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help in Setting Environment variables in TCSH kssandeep Shell Programming and Scripting 1 02-18-2008 04:16 AM
Listing and setting up cron jobs NycUnxer UNIX for Dummies Questions & Answers 3 11-08-2007 05:45 PM
Setting environment variables in Makefile Bags Shell Programming and Scripting 1 05-19-2006 01:58 PM
Setting up Environment Variables rpandey Shell Programming and Scripting 6 06-06-2005 06:28 AM
setting environment variables ??? Gargamel UNIX for Dummies Questions & Answers 5 06-13-2002 08:12 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-06-2006
Registered User
 

Join Date: Oct 2006
Posts: 6
Stumble this Post!
Setting environment variables within cron jobs!!

Is it possible to use environment variables within cron jobs. I am using a cron job to run a c program at regular intervals. The C program uses a library and i have set the library path in the LD_LIBRARY_PATH environment variable. But when i ran the job i got the error library not found!! Any suggestions!!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-09-2006
System Shock's Avatar
Registered User
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 378
Stumble this Post!
You need to create a script that sets the variable and runs your program, like:
Code:
* * * * * /usr/local/bin/myscript

cat myscript

export LD_LIBRARY_PATH=/your/library/path
/usr/local/bin/myCprogram
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 05:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0