crontab and tty
Jason
jkenner@mindspring.com
Mon, 23 Oct 2000 00:17:54 -0700
AZ_Pete wrote:
>
> 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.
Since bash scripts can be terminated by pressing ctrl-c, perhaps bash
is looking for a source of input?
--
jkenner @ mindspring . com__
I Support Linux: _> _ _ |_ _ _ _|
Working Together To <__(_||_)| )| `(_|(_)(_|
To Build A Better Future. | <s>