This should reconnect a Raspberry Pi if it drops from the network due to router issues...
*/5 * * * * /bin/ping -q -c10 192.168.1.254 > /dev/null 2>&1 || (sudo /sbin/ifconfig wlan0 down ;sleep 5 ;sudo /sbin/ifconfig wlan0 up ;/usr/bin/logger wifi on wlan0 restarted via crontab)