I have SLES8 and Oracle DB 9iR2 in it. I created a export script like this: oracle@oracle:~> more bin/backup file_name=export_`date +%d_%m_%Y_%H_%M`.dmp exp kfc/oracle full='Y' file=$file_name gzip -c9 $file_name >> $file_name.gz rm -f $file_name If I run this script with user oracle and bash shell, it run succesfully. But if I put that script on user oracle's crontab, it won't work. How to set environment in user oracle's crontab? --- This email is protected by Clam AntiVirus and SpamAssassin
The Thursday 2004-04-08 at 14:45 +0700, Agi Subagio wrote:
If I run this script with user oracle and bash shell, it run succesfully. But if I put that script on user oracle's crontab, it won't work.
Cron uses a diferent environment. You have to splicitly call every program by its full name, path included (use `which program' to get them).
How to set environment in user oracle's crontab?
"PATH=whatever" at the start of the crontab file. Read "man crontab" for more info. -- Cheers, Carlos Robinson
participants (2)
-
Agi Subagio
-
Carlos E. R.