Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crontab doesn't work

Status
Not open for further replies.

lancerine

Technical User
Sep 30, 2003
8
ID
Hi,
I'm using Linux AS and trying to assign several shell script to the server.
I have two scripts that are executable (I run them and both worked fine), say script A and script B. When I assign them in crontab, script A works on schedule BUT script B is not running at all.
What is the problem? the content of both scripts are quite similar. This how I write the crontab:
[oracle@10 oracle]$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.17027 installed on Fri Dec 31 17:21:19 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
00 04 * * * /data1/SCRIPT/scriptA.sh
00 11 * * * /data1/SCRIPT/scriptB.sh

Both files have the same owner and have the same privilages/modes.
How can this happen?
Thank you, please help.. it has been weeks just to solve this.
 
Does script B require a slightly different environment (PATH setting etc). This is the most common problem as cron itself runs in a very limited environment, usually insufficient for applications like Oracle etc.
 
Have you had a look in /var/log/cron to see what is going on at the times that the script is supposed to run?

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 
You HAVE told cron to re-examine the crontab, right?!

kill -HUP `pidof crond`
or
kill -HUP `pidof cron`

Depends how your cron daemon is named, check "ps ax" to be sure.

Hosting Solutions for Home or Business.
 
thank you guys, I have found the problem. the script eventually didnt read the crontab PATH correctly, so it can not read exp, imp, or sqlplus.exe. I have correct the PATH and now it works!

Thanks a lot for your help.
Stella
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top