The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Telnet is not working properly deepak_pathania UNIX for Dummies Questions & Answers 1 10-05-2007 02:59 PM
Rlogin not working properly from Linux frankkahle UNIX for Advanced & Expert Users 1 10-19-2006 07:02 PM
Cron won't run properly Steeler_fan UNIX for Dummies Questions & Answers 2 08-31-2006 06:32 AM
y is this not working properly? C|[anti-trust] High Level Programming 3 05-18-2005 09:55 AM
Keyboard not working properly... timresh UNIX for Dummies Questions & Answers 2 02-25-2005 03:28 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2007
Registered User
 

Join Date: Oct 2007
Posts: 59
Stumble this Post!
Unhappy Cron - Not working properly

Hi,
I do have three scripts. Whcih inserts records into a table using sqlldr, creating some reprot files etc. The first script will call the second and then the second will call the third. When I run my first script from the shell prompt, all my operation are completed successfully. If I do the same using a cron , then its working partially. Not able to insert records, log files not generating etc.. Is there any seeting to be made in cron or how can this be solve ?? Help me out ... I am using HP-Unix
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-26-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Do a search on this site. 99% of cron problems are due to people making wrong assumptions about the environment.

cron gives you a minimal environment, it does not run your .login, .profile or whatever.
Reply With Quote
  #3 (permalink)  
Old 10-26-2007
Registered User
 

Join Date: Oct 2007
Posts: 59
Stumble this Post!
I am using unzip in my second script. But that command is returning 127. As i said earlier if I run my first script from the prompt, then it call the second script, it does the unzip operation succesfullly and the process goes on. Only when the first script is scheduled in a cron, the unzip fails and after that nothing is working. Wat can be done for this ??
Reply With Quote
  #4 (permalink)  
Old 10-26-2007
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,002
Stumble this Post!
What can be done first is to start here with the FAQs
Reply With Quote
  #5 (permalink)  
Old 10-28-2007
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 486
Stumble this Post!
Unzip returns 127 = ???
And show us your script perhaps.
Reply With Quote
  #6 (permalink)  
Old 10-29-2007
Registered User
 

Join Date: Oct 2007
Posts: 59
Stumble this Post!
unzip myfile.zip > /dev/null
echo $?


If i store the above lines in a script and run that manually then its working fine. If i schedule the script using cron , htne its returning 127. What could be cause ??
Reply With Quote
  #7 (permalink)  
Old 10-29-2007
Technorati Master
 

Join Date: Mar 2005
Location: Large scale systems...
Posts: 2,546
Stumble this Post!
try giving the absolute path of unzip

should be in /usr/bin/unzip

and wrap the commands in a script and redirect the script output to a log file to see what error is actually displayed.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:43 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0