The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
crontab couldn't run through, help duke0001 UNIX for Advanced & Expert Users 10 02-06-2008 03:22 AM
help with crontab bob122480 Shell Programming and Scripting 3 01-22-2007 08:49 PM
Crontab gen4ik UNIX for Dummies Questions & Answers 1 01-18-2007 07:26 AM
ftp and crontab user` Shell Programming and Scripting 27 11-13-2006 08:02 PM
Crontab lo-lp-kl UNIX for Dummies Questions & Answers 2 05-05-2005 07:21 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-07-2008
rmard rmard is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 1
Question 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.

Here is the error message:

Code:
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..
  #2 (permalink)  
Old 02-08-2008
GaneshB GaneshB is offline
Registered User
  
 

Join Date: Jan 2008
Posts: 11
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 .
  #3 (permalink)  
Old 02-10-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:12 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0