The UNIX and Linux Forums  

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


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
not getting the output properly pmrajesh21 SUN Solaris 0 04-16-2008 07:43 AM
Cron - Not working properly risshanth HP-UX 23 10-31-2007 03:34 AM
New hdd not being recognised properly by OS wiggiesworld UNIX for Dummies Questions & Answers 1 06-03-2006 06:59 AM
y is this not working properly? C|[anti-trust] High Level Programming 3 05-18-2005 09:55 AM
Not properly shutdown DISTURBED Filesystems, Disks and Memory 5 05-06-2005 06:39 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-30-2006
Registered User
 

Join Date: Aug 2006
Posts: 2
Cron won't run properly

I am new to unix, and this is my 1st post on this board. Looking for some advice about a cron job in my server.

I am running a cron task that references a script which runs several other scripts and compiles them into a report and emails it to me. If I run the script manually, I will receive the whole report, but when it runs through cron, it will run successfully, but the report is incomplete.

I keep thinking that there is a permission issue somewhere, but I am unsure. Any suggestions?
Reply With Quote
Forum Sponsor
  #2  
Old 08-30-2006
System Shock's Avatar
Registered User
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 395
This is a very common issue. A script run in cron does not take the user environment into consideration, i.e., paths, shell, etc. You need to go back to your main script and all the others referenced in the main script and make sure that shells and paths to commands are declared.

BTW, you can do a search in this forums. You will be able to find more details on this, and a lot of other common questions.
Reply With Quote
  #3  
Old 08-31-2006
Registered User
 

Join Date: Aug 2006
Posts: 2
The directory information seems fine, because like I said when I run it manually the whole report is completing. But the shell may be a problem.

In the crontab, the task designates "csh -c" but then in the beginning of the other scripts, it does not designate which shell is being used.

How would I do that in the script? should I add a line "!/bin/csh" ?
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 11:46 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