crontab and tty

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Joseph T. Tannenbaum
Date:  
Subject: crontab and tty
When you are on the cmd line, you have a dedicated tty.
I also had this problem when trying to print from an
init script. What I did was "print xxx > /dev/console to
get it to work.

Joe

> -----Original Message-----
> From:
> [mailto:plug-discuss-admin@lists.PLUG.phoenix.az.us]On Behalf Of AZ_Pete
> Sent: Friday, October 20, 2000 10:56 AM
> To:
> Subject: crontab and tty
>
>
> 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
>
>
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail
> doesn't post to the list quickly and you use Netscape to write mail.
>
> Plug-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>