The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-23-2006
hegemaro hegemaro is offline
Registered User
 

Join Date: Feb 2006
Location: Schenectady, NY
Posts: 130
Without seeing the script it is rather difficult to debug, however I have found many scripts and commands do not work under cron because you're not in the directory you expect.

When you run the script from the command-line you are using the current working directory. When you run the same script from cron, you're executing it from the home directory of the account that is executing it. So, it is very important to either explicitly change directory into a given run directory or use absolute pathnames for temporary files and such.

If this does not apply to your situation, a copy of the script would be helpful.
Reply With Quote