Linux

#!/bin/bash    
wlan=`/sbin/ifconfig wlan0 | grep inet\ addr | wc -l`    
if [ $wlan -eq 0 ]; then    
    /sbin/ifdown wlan0 && /sbin/ifup wlan0
else    
    echo interface is up    
fi


# Then chmod 555 /root/checkwanup and add it to your crontab:

crontab -e
*/15 * * * * /bin/bash /root/checkwanup

Similiar Collections