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