My webcam is running on an old MacBook that seems to have a spotty connection to the internet. When this computer drops the wifi connection, it doesn't ever seem to reconnect. The networksetup command can be used to reconnect, so I'm calling this every 5 minutes from cron to force the connection.
The command was also added to /etc/sudoers so we can call the command with sudo without a password.