Bash script acting funny when run from Crontab

Hello, first time here. I have a script that seems to ignore the if statement when run from the cron. I am using Ubuntu 12.10

#!/bin/bash

DOWN=/usr/sbin/dcon
UP="pon dsl-provider"
LOG=/var/log/dsl-reconnect.log

RECV=`ifconfig 2>&1|grep ppp0|cut -d , -f 5|cut -d " " -f 1`

if [[ $RECV != *ppp* ]]
then
echo "connecting..."
echo ----- >>$LOG
date>>$LOG
$DOWN >>$LOG 2>&1
wait for kill
sleep 3
echo "hopefully killed"
$UP >>$LOG 2>&1
fi

When run from console, the script works the way it should, I even tested by echoing $RECV before the if statement and it shows hat it holds the value ppp0, however when run from cron, it doesn't seem to work right, it does everything within the if statement, killing the connection and reconnecting it, regardless if its already connected.

BTW, This is a modified script from this site - www dot khattam dot info/howto-auto-re-connect-to-dsl-pppoe-in-linux-2010-03-07.html which didn't work at all for me. I tried using the pppoe settings but Ubuntu seems to ignore the settings.

---------- Post updated at 01:46 PM ---------- Previous update was at 12:59 PM ----------

Ok, fixed it, seems when you place something in the cron using crontab -e the environment ignores /sbin/ so I made it do the command /sbin/ifconfig and it works fine.

Many commands run differently in cron because either they sense a controlling terminal or the environment is not set equivalently. "The environment" that you are responsible for providing for did not have the right $PATH. Write a cron script that just does 'set' into a file to see what environment comes for free.