Help me with crontab

Hi,

I am working with oracle, and want to make a scheduler program by using cron job..

I've done with shell script that calls oracle stored procedure. It works.

However, when I call the script through crontab, it is failed. :frowning:

Here is the error message:

Cron: The previous message is the standard output
      and standard error of one of your crontab commands:

sh /app/bea/report/script.sh


From root@icaredv1 Wed Feb  6 17:22:00 WIB 2008
Received: (from root@localhost)
	by icaredv1 (8.11.1/8.11.1) id m170M0v06352
	for acn01; Wed, 6 Feb 2008 17:22:00 -0700 (WIB)
Date: Wed, 6 Feb 2008 17:22:00 -0700 (WIB)
From: root@icaredv1
Message-Id: <200802070022.m170M0v06352@icaredv1>
Subject: cron

/app/bea/report/script.sh[3]: sqlplus:  not found.


*************************************************
Cron: The previous message is the standard output
      and standard error of one of your crontab commands:

sh /app/bea/report/script.sh

I've check whether I missed something with my cron file. But, when I use other shell script for cron, it works.

Please anyone help me. Thank you..

Hi ,
u need to define Env . Varibles .
Here i think you did not define the Env .veriables , hence the cron is not able to locate 'sqlplus' . pls change it ..it will work .

As GaneshB hints, cron doesn't set any environment variables. Add a step to the start of your script that picks up the user's profile again or create a wrapper script to do this.