You can use the -t operator to check whether your script is connected to a TTY.
At least under my Debian system, I get a positive result (1) for the -t operator for a job started from the console, and nothing for 'crontabbed jobs'.
HtH,
-- JaWi
"A chicken is an egg's way of producing more eggs."