Skip to content

Instantly share code, notes, and snippets.

@kenzie
Created June 15, 2011 23:13
Show Gist options
  • Save kenzie/1028357 to your computer and use it in GitHub Desktop.
Save kenzie/1028357 to your computer and use it in GitHub Desktop.
Wifi Switch via Cron on a Mac
# open Terminal.app
# sudo crontab -e
[email protected]
# networksetup -setairportnetwork <network> <device name> [password]
0 9 * * 1-5 /usr/sbin/networksetup -setairportnetwork AirPort "3G" "password"
0 17 * * 1-5 /usr/sbin/networksetup -setairportnetwork AirPort "DSL" "password"
@kenzie
Copy link
Author

kenzie commented Jun 15, 2011

I have an expensive (fast) 3G connection I use for work (weekdays, 9am-5pm) and a cheap (slow) DSL connection for the rest of the time. I set up this cron script to switch networks automatically for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment