The drush script which provides comman line acceess to drupal functionality emits an error message when run as a cron job
tput: No value for $TERM and no -T specified# If it is not exported determine and export the number of columns.
if [ -z $COLUMNS ]; then
export COLUMNS=$(tput cols)
fiI presume drush uses this information to calculate layout of output.
However when running as a cron job COLUMNS is not set and tput gives the above error.
To resolve this specify a COLUMNS value in your cron job, setting an appropriate size for viewing in email
cron now runs the following for me.
#!/bin/bash
cd /var/www/mysite/public_html
COLUMNS=80 /home/me/bin/drush cron

Comments
Thanks, having this problem
Thanks, having this problem too. Google lead me to this page when searching for the above error message ;)
Comments
Use of "export COLUMNS" in cron job
Thanks for this,
Just a small note, you can also edit your cron job instead of editing your scripts(which might be used elsewhere, not only in cron jobs and you don't want to mess with them), to do this use "export" for COLUMNS
example:
25 02 * * 2 COLUMNS=120 ; export COLUMNS ; bash /path/to/script.sh
Comments
Easier fix
Just adding a line:
COLUMNS=80
at the top of the crontab file works for me :)
Post new comment
Got something to add - just enter a comment
all other fields are optional.