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
Script an Oracle Command Line Blackout pattieatte Shell Programming and Scripting 0 08-30-2007 05:28 PM
script works on command line, not in cron job JackTheTripper UNIX for Dummies Questions & Answers 7 06-27-2007 02:51 AM
Adding command line env in cron env abhijeetkul Shell Programming and Scripting 1 12-13-2005 09:42 AM
process nice level command line vs cron henrydark UNIX for Advanced & Expert Users 0 06-02-2005 11:04 PM
command line work script doesn't larry Shell Programming and Scripting 2 08-27-2003 03:33 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-22-2008
rahulrathod rahulrathod is offline
Registered User
  
 

Join Date: Sep 2004
Location: Mumbai-India
Posts: 158
Script through cron and command line

I have a script which runs fine through command line, but doesn't run through cron. There are some variables which are set by the .profile file which are used by the script. Is it that cront does not pick these variables.


Code:
$/export/home/rahul/bin/createfile.sh >> /export/home/rahul/log/logfile.txt 2>&1

The above works fine and gives the output in the log as follows.

Code:
$cat /export/home/rahul/log/logfile.txt
File created.

When run through cron, the log file has the following output.

Code:
$cat /export/home/rahul/log/logfile.txt
sqlplus: Command not found.
sqlplus: Command not found.

Does the .profile not run for the user when the script is run through cron?

Regards,
Rahul.
 

Bookmarks

Tags
cron

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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




All times are GMT -4. The time now is 03:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0