When wall runs from CRON it outputs the following warning:
wall: cannot get tty name: Inappropriate ioctl for device
By default, wall is doing this because the TTY name is in the banner message, e.g.
Broadcast message from user@host (pts/0)
...but there is no TTY when running from CRON.
The solution is to use the -n option for wall to suppress the banner:
0 5 * * * ( /root/cron_scripts/run-if-today.sh 2 Wed && /usr/bin/wall -n 'This server (asd-pup.internal.ncsa.edu) will be updated and rebooted in 1 hour.' )
When
wall
runs from CRON it outputs the following warning:By default,
wall
is doing this because the TTY name is in the banner message, e.g....but there is no TTY when running from CRON.
The solution is to use the
-n
option forwall
to suppress the banner: