I'm trying to implement a script to call a third-party tool every so often and write the results to a file. If I run it interactively it works fine, but when it comes to run it out of a cronjob, I keep getting this error:
stty: tcgetattr: a specified file does not support the ioctl system call
I need to call stty cols 132 so that the third-party tool works at all, otherwise I'd get: "display area must be at least 10 rows and 80 columns press <ctrl-d> to exit" written to my log file.
I have googled the error and people advise that cron does not have a terminal
Well, they're right: You don't have a terminal, and that badly-programmed proprietary app apparently demand one even in batch mode. You'll have to fake the presence of a terminal somehow.