If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > problem in running shell script from CRON

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-07, 14:07
shuzghun shuzghun is offline
Registered User
 
Join Date: Jul 2007
Posts: 1
problem in running shell script from CRON

Hi I am facing problem in running cron jobs which actually calls a shell script .

Can anyone help as i am new to unix .

Whenever i run the cron job it does nothing .
I see that the shell is called but don't know why it is not getting executed.
But when i run the shell independently it executes .
Pls let me know in details the problem adn the soltuion .
Kindly help it is urgent .

yes one more thing
I have made a plenv.sh in which i have declared all databse connection , java path , class path etc and use it in the shell script --- is that the reason ??
regards
shuz

Last edited by shuzghun; 07-13-07 at 15:22.
Reply With Quote
  #2 (permalink)  
Old 07-13-07, 17:19
Tyveleyn Tyveleyn is offline
Registered User
 
Join Date: Aug 2006
Location: The Netherlands
Posts: 248
Hi,

Are all the env.variables needed by the shell set in the script or sourced from another file? A shell started by cron doesn't read the .profile and therefore hasn't got the usual settings.

Regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On