The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 not running properly when run from Crontab simoncjones Shell Programming and Scripting 2 05-03-2009 02:11 PM
problem running shell script (for oracle export) in crontab jsheehan223 Shell Programming and Scripting 1 10-16-2008 03:29 PM
Facing issue in Solaris OS in crontab for running shell script mabrar Shell Programming and Scripting 2 11-02-2007 06:32 AM
Command Not running in script Dastard Shell Programming and Scripting 2 05-21-2007 05:08 PM
running multiple rsh command in a script lweegp Shell Programming and Scripting 0 10-31-2006 02:37 AM

 
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 07-02-2009
mystition mystition is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
A command in a script not running in Crontab.

Hi,

I made this script for TRU Unix 5.1 OS based Node.
When the script was run manually all the commands were running properly. But when it was run from Crontab, one command is not running.

This command is not running when the script is running from Crontab:
# /usr/mg2/svi/svicom/svistatjo.x -j 20090702 -f stat_log_temp
(This is a application based command used ti fetch certain statistics of that application depending on the date)

I am using /bin/ksh shell in the script.The crontab I am using is for root user, and the command is also run by root

[ Following are the fixes that I have tried till now, but it has not done any good:

Fix 1:
I tried to find the directory from which the command is executing by the following way:
# cd /usr/mg2/svi/svicom
# which svistatjo.x
Output: /usr/mg2/svi/svicom/svistatjo.x
If the command 'which svistatjo.x' is executed from any other path, no ouput is obtained.
This is the reason the command i gave above was with the full path.

Fix 2:
I used the command this way in the script too, but it is still not runnng through crontab.
#su -c "svistatjo.x -j 20090702 -f stat_log_temp"

Also, Whenever I am running the script from Crontab, an error is coming in mail, something like :
"stty: tcgetattr: Not a typewriter
stty: tcgetattr: Not a typewriter
Not a terminal
Ambiguous output redirect. ", but I am not sure how this error is related to the command.]

Please suggest modifications so that this command can be run from crontab also.

\\ Thanks in anticipation
 

Bookmarks

Tags
command not running from crontab, svistatjo.x

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 08:26 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