[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron and standard io



On Mon, Feb 09, 2004 at 03:20:47PM -0500, Harland Christofferson wrote:
> i have a bash script called from a cron job. i want to change the 
> terminal size so, within the script, i tried:
> 
> stty cols 160 rows 60
> 
> the result of the script indicated that there is a standard io error 
> when this line is run from the cron job. it works fine when run from 
> an xterm shell however. 
> 
> how can i tell the kernel the size of the io device from a cron job? 
> whatever the default value is when the cron job is run is too small 
> for my needs.
>

Cron jobs don't have terminals. Their output is normally attached to a
pipe that will send an e-mail to whoever owns the job if there is any
output.

If you're trying to set the size of your xterm when it opens try 
'xterm -geometry 160x60'. Or have a look at putting stty in your
.bash{profile,login,rc} with appropriate testing of $TERM.

Brian



Reply to: