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 04:28 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #8  
Old 10-29-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
Erm, when you run 'unzip myfile.zip', are you running the command from the directory where myfile.zip is present? What I mean is, does your cron script actually do a 'cd' to the directory where the myfile.zip file is present?

When you run the script you might be running it from the directory where the file is already present. However, when a script runs through cron, the working directory is usually the home directory of the user whose cron is running the script.
Reply With Quote
Forum Sponsor
  #9  
Old 10-29-2007
Registered User
 

Join Date: Oct 2007
Posts: 61
Hi,
The locations are given correctly. Even I tried running my script from the home directory, by giving the whole path. Its executing perfect. the only probelm is when i schedule my script in cron, its throwing the error. I do have many operaiton in my script. Like unzip, I use sql loader , sql plus commands too. All are giving error when scheduled in cron. So what else can be done ???

I tried /usr/bin/unizip .. Its telling
ksh : /usr/bin/unizip : not found
Reply With Quote
  #10  
Old 10-29-2007
Registered User
 

Join Date: Jun 2007
Location: Pietermaritzburg, KZN, South Africa
Posts: 5
Make sure your paths are correct. I see you've got "/usr/bin/unizip" instead of "/usr/bin/unzip". Check for where your commands are using "whereis cmd_name", e.g. %whereis unzip.
Reply With Quote
  #11  
Old 10-29-2007
Registered User
 

Join Date: Oct 2007
Posts: 61
Hi,
I gave whereis unzip. Its showing :

unzip:

So i too doubt the location about that command. But still , its working when i run the script manually, instead of using the CRON. As shown above for unzip, the same is coming for sqlldr and sqlplus. So how can i use them with cron ??

I am really confused about this situation..
Reply With Quote
  #12  
Old 10-29-2007
Cameron's Avatar
Registered User
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 490
Is there any chance you can show us your entire script ??

It might be something else that you have in it that's causing it to run standalone and not via cron.
Reply With Quote
  #13  
Old 10-30-2007
Registered User
 

Join Date: Jun 2007
Location: Pietermaritzburg, KZN, South Africa
Posts: 5
I think posting your script might help.Just out of curiosity: Make sure you have $ sign in front of your commands in your script, e.g. $unzip file_name ,etc.
Reply With Quote
  #14  
Old 10-30-2007
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 3,029
Quote:
Originally Posted by mokgonec View Post
I think posting your script might help.Just out of curiosity: Make sure you have $ sign in front of your commands in your script, e.g. $unzip file_name ,etc.
why is that?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:15 PM.


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

Content Relevant URLs by vBSEO 3.2.0