Issue while running from crontab


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Issue while running from crontab
# 1  
Old 03-14-2011
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-

Code:
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 /opt/IBM/dwe/db2/V9.5/bin to $PATH, still no result. Any idea where is the issue might be ?

Thanks,
Naresh
# 2  
Old 03-14-2011
Hi,

did you have a look at the crontab-FAQ of this forum (especially the last paragraph)?
# 3  
Old 03-14-2011
you should load your environment from within your script

or in your script, just replace your

rahhost

with

Code:
/opt/IBM/dwe/db2/V9.5/bin/rahhost

# 4  
Old 03-15-2011
Hi,

Even after giving full rah path, it's not working. How to invoke environmental path from a script?
# 5  
Old 03-15-2011
Check out the link cero posted.
# 6  
Old 03-15-2011
You must have something like that :

Quote:
10 08-18 * * 1-5 $HOME/.profile >>/dev/null 2>&1;/dev/IBM... >>/dev/null 2>&1
 
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. Shell Programming and Scripting

Crontab running bi-weekly

Hi experts, Need your help to schedule the script(test.sh) bi-weekly in linux machine. script need to run at every alernate thursday at 9 am . Please help to run the same. (6 Replies)
Discussion started by: abhigrkist
6 Replies

4. Solaris

Please help why my Crontab is not running on time?

I have set up my cron job on the solaris SunOS 5.10 Generic_138888-03 sun4u sparc SUNW,UltraAX-i2 but it is not running on time as expected. Would you please help me to find out what I did wrong? I want to have this cron job run once every month on the 1st Wednesday of the month, but it ran... (6 Replies)
Discussion started by: ggcc
6 Replies

5. Shell Programming and Scripting

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... (4 Replies)
Discussion started by: NARESH1302
4 Replies

6. 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

7. UNIX for Dummies Questions & Answers

crontab job not running

Hi all, down here part of the scheduled job in crontab (AIX Version 5) i have problem running jspPRE-ALL. i verrify permissions and privileges (the others job are working good) if i run the job in command line it work correctly # # Aggiornamento doni e continuity 00 02 * * 2-6... (5 Replies)
Discussion started by: ilpasta
5 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