crontab and tty

AZ_Pete az_pete@ieee-cas.org
Fri, 20 Oct 2000 10:56:10 -0700


I'm getting an error when I run a script via crontab.  The error is emailed
to me and consists of:
'stdin: is not a tty'.

I created a small test script to better verify the error and the resulting
error is the same.
Here is the test script:

#!/bin/bash
. $HOME/.bash_profile
env > test.txt

The script execute fine from the command line with no errors generated.
When I run it from crontab, the error 'stdin: is not a tty' is emailed to me
from crontab.
I have been able to cure the problem by appending
' > /dev/null 2>&1 ' to the end of the crontab entry.  However, this seems
like a band-aid fix that doesn't address the underlying problem.

Does anyone have any ideas what is wrong and how I can cure this problem.
Thanks
Peter