Applescript/Automator turn off internet
I have satellite internet due to where I live. I have unlimited download/upload from 1-6am and am backing up my mac to a cloud server. I want to set my laptop to turn off wifi at 6am so I do not use up my limit (250mb/day).
Is there an applescript or automater I can use for this? thanks for any help.
I know I can just set the computer to shut down then but have had firefox and other programs at times lock up (not in a long time though) and stop the computer from shutting down.
This hint will show you how to disable/enable the Airport of your Mac.
Enable and disable Airport from the command line - Mac OS X Hints
Then use an Automator action to run a shell script with those commands, and then schedule those Automator Applications with iCal to run at 6:00AM and maybe 6:15AM to re-enable.
The problem you will face is running sudo commands unattended. Which is not a good practice.
This thread will go over some methods (with obvious security concerns) as well as methods to limit damage.
Shell script sudo without password prompt under Darwin? [Archive] - The macosxhints Forums
FYI, you can also enable/disable the airport/Wi-fi without sudo using:
* Note: You might need to change the "en0" part to match whichever network device you're wanting to affect. Get a list of all devices with:
|All times are GMT -4. The time now is 12:37 PM.|
Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.