rah issue when running from crontab


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting rah issue when running from crontab
# 1  
Old 03-11-2011
rah issue when running from crontab

Hi All,

I've prepared a script, content is-

#!/bin/bash
echo "HI" > /tmp1
rah ";\ df -m" | sort -u >> /tmp1
echo "BYE" >> /tmp1

I've scheduled this script to be run thorugh crontab, but the script is not being able to run rah command. The output file is coming like this-

$cat /tmp1
HI
BYE

When I am running this file outside in command prompt, it's running fine. Where is the issue? I've 10 servers configured together for our db2 instance.

Thanks,
Naresh
# 2  
Old 03-11-2011
Try using the full path for rah.
# 3  
Old 03-11-2011
How to find out full path of rah?
# 4  
Old 03-11-2011
try:

Code:
type rah

I think it should give you the path name.
# 5  
Old 03-11-2011
Yes got the path. I gave path like this, still no use.:-(

/db2home/bculinux/sqllib/bin/rah "df -m"

It's not being able to run rah command from crontab.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Crontab is not loading/running

hi, i have crontab where i have put my db backup scripts but crontab do not run at specific time. i have checkted the scripts andwhen run the script as ./mydbbkp.sh so it successfully run and do the job but from cron it is not running whihcmeans cron is not running. i have an oracle user under... (3 Replies)
Discussion started by: janakors
3 Replies

2. Shell Programming and Scripting

Issue in running shell script in crontab

I'm having a shell script which has to be run only once at the specified time. Shell script is like following, #!/bin/bash db2 connect to XXX > connection_status.txt This script is scheduled in crontab as following, 50 4 8 5 0 sh script.sh scheduled script is run at the specified time... (1 Reply)
Discussion started by: Rajkumar Gandhi
1 Replies

3. UNIX for Dummies Questions & Answers

crontab not running script

Hi All, I am having the below script to be run from crontab, it it doesnt run. 1 * * * * /home/cobr_ext/test.sh > /home/cobr_ext/temp.txt when i run i manally it runs without any issues. Could please help me as to why doesnt it run the script.:( (7 Replies)
Discussion started by: abhi_123
7 Replies

4. UNIX for Dummies Questions & Answers

Issue while running from crontab

Hi All, Here is my command which I've scheduled to be run from crontab, but it's giving error message: rah: rahhost executable needed but not in PATH My cmd is- 36 10 * * * /opt/IBM/dwe/db2/V9.5/bin/rah "df -m" >> /db2home/bculinux/Files/log/db.out 2>&1 Though I've added path... (5 Replies)
Discussion started by: NARESH1302
5 Replies

5. Shell Programming and Scripting

Crontab not running a script

Hi, I posted this in the Solaris forum but I think this one would be more appropriate. I created a script starting with the following lines: #!/usr/bin/ksh flag=n export flag typeset -i quant=0 (...) When running it I'm getting the following 2 errors: /tmp/tstscript/testfail.ksh:... (9 Replies)
Discussion started by: Cvg
9 Replies

6. Shell Programming and Scripting

rah output

Hi All, I want the output of rah "df -m" command in csv file (or in readable format). How can I configure it as csv file? The output is : rah "df -m" Filesystem 1M-blocks Used Available Use% Mounted on /dev/sda2 10084 2733 6840 29% / udev ... (3 Replies)
Discussion started by: NARESH1302
3 Replies

7. Shell Programming and Scripting

issue with running script with crontab

I am facing a strange issue while running a script(eg A) from the crontab entry the script calls one more script(eg B) within it now when i run the script A manually(with nohup) it also executes the script B (embedded inside it) as expected. but when i run the script A from the crontab entry... (7 Replies)
Discussion started by: mad_man12
7 Replies

8. UNIX for Advanced & Expert Users

Crontab is not running!!!

Hi experts, need your helpo. after editing the crontab while saving the file it says- "/tmp/crontabRlaauT" 1 line, 77 characters cron may not be running - call your system administrator And i checked after certain time. script in cron is not running. I got a mail in user saying... (1 Reply)
Discussion started by: thepurple
1 Replies

9. Shell Programming and Scripting

Facing issue in Solaris OS in crontab for running shell script

Hello i have a shell script. it is running fine when i manually run at command prompt using following command ./script_file but while running shell script from crontab, it is giving error in each line. (2 Replies)
Discussion started by: mabrar
2 Replies

10. UNIX for Dummies Questions & Answers

running sql in crontab

Hi, i have a scripts that update an SQL DATABASE using sqlplus command. when i run it in a interactive mode its ok but when try to run it using the crontab i get an a messege : "Must be attached to terminal for 'am I' option" (there is no "who am i" command in the script) and the DB... (4 Replies)
Discussion started by: dorilevy
4 Replies
Login or Register to Ask a Question