Not able to print variable value in crontab entry


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Not able to print variable value in crontab entry
# 1  
Old 12-10-2007
Not able to print variable value in crontab entry

Hi,

I just stuckup to echo a variable that is assigned in .profile file from a crontab entry.

I have a entry in .profile as,

CONF_FILE_PATH=/home/test/conf
export CONF_FILE_PATH

I am able to echo it in command line but I am not able to print $CONF_FILE_PATH when i scheduled it in crontab like

* * * * * echo $CONF_FILE_PATH

Kindly give me some light into this hangup.


Thanks,
Naren
# 2  
Old 12-10-2007
cron does not work the way login works. It does not run a .profile for example.
You will have to modify the script you run from cron to explicitly run the .profile you want.
# 3  
Old 12-10-2007
hey, I answered on linuxquestions
# 4  
Old 12-10-2007
Sorry bigearsbilly, really sorry, I just saw your reply

Naren
# 5  
Old 12-10-2007
I included this piece of code at the end of .profile but in vain Smilie

if [ -f $HOME/.profile.ext ]
then
. $HOME/.profile.ext
fi



-----
Naren
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Crontab entry

Is this the correct entry to touch a file on 6/6 5AM? 00 05 06 06 * touch /support/home/.no_copy Please use next time code tags for your code and data (5 Replies)
Discussion started by: Me XMan
5 Replies

2. Solaris

crontab entry

hi i am new in solaris. i am accessing server through putty. i could not add entry in crontab. i have given "crontab -e" for add a new entry. It is not coming. what parameter i have to set for getting crontab -e thanks (1 Reply)
Discussion started by: sunnybee
1 Replies

3. UNIX for Dummies Questions & Answers

Crontab entry

What should be the crontab entry for a script: to run at 3:00 AM EST Sun, Mon, Tue, Wed, Thu, Fri (3 Replies)
Discussion started by: proactiveaditya
3 Replies

4. Solaris

crontab entry

How to set the crontab entry for every other Friday? Regards, Raj (1 Reply)
Discussion started by: rajip23
1 Replies

5. AIX

crontab entry

Hi. I'm new to AIX and I need to create a crontab entry to run a script every first 5 business days of the month? please help. (2 Replies)
Discussion started by: udelalv
2 Replies

6. Shell Programming and Scripting

Crontab Entry

Hi Everyone , have a nice day given below is the line i have added in crontab * * * * * /Rauf/script2.sh intended to run this script after every minute , when i run this script manually it runs fine and produces output , but after adding it to crontab ( like given above ) , it doesnt work ... (5 Replies)
Discussion started by: Dastard
5 Replies

7. UNIX for Advanced & Expert Users

crontab entry

Sometimes cron really upsets me and I cant figure out these types of wierd dates, but how do I get cron to run something on every other sunday? I am running Solaris 8. -S (4 Replies)
Discussion started by: Sowser
4 Replies

8. Shell Programming and Scripting

Crontab entry

Hello, I am trying to schedule a job to run every 15 minutes from 7am to 5:30pm. Could someone show me the syntax for this? Thanks. (1 Reply)
Discussion started by: bestbuyernc
1 Replies

9. UNIX for Dummies Questions & Answers

crontab entry

hi all how to schedule a cron job running on last day of every third month at 12 midnight will the following work 0 0 30,31 3,6,9,12 * <required file> thanks (3 Replies)
Discussion started by: matrixmadhan
3 Replies
Login or Register to Ask a Question