Results 1 to 3 of 3

Thread: Applescript/Automator turn off internet

  1. #1
    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.
    Check out some of my Design work.

  2. #2

    MacsWork's Avatar
    Member Since
    May 22, 2005
    Closer than you think.
    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

  3. #3

    Member Since
    Dec 04, 2007
    FYI, you can also enable/disable the airport/Wi-fi without sudo using:

    networksetup -setairportpower en0 off
    networksetup -setairportpower en0 on
    I put it in an Automator workflow > Run shell script. Add other stuff to the workflow if needed, then save as Application or Service (to use a hotkey).

    * 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:
    networksetup -listallhardwareports
    I'm using OS X Mountain Lion 10.8.2 - The commands might be slightly different on other OS versions. This page has some info:

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Automator or applescript to autofill from contacts?
    By ryanmalgeri in forum Apple Desktops
    Replies: 0
    Last Post: 11-10-2014, 06:30 PM
  2. Using Automator / Applescript
    By mrsausages in forum Switcher Hangout
    Replies: 0
    Last Post: 04-25-2010, 05:01 PM
  3. Automator or Applescript?
    By Guru Meditation in forum macOS - Operating System
    Replies: 1
    Last Post: 11-22-2008, 11:01 AM
  4. Applescript and Automator
    By Thundermoon1994 in forum Switcher Hangout
    Replies: 5
    Last Post: 11-10-2007, 03:16 PM
  5. Applescript or Automator Help!
    By BushyMark in forum macOS - Operating System
    Replies: 1
    Last Post: 01-14-2007, 06:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts