4

I'm a student with a Mac laptop on which I take notes. My school has an Internet network. I get distracted during class.

I found this wonderful Mac app called SelfControl, but activating and deactivating it multiple times a day is a real drag.

Is there a way I can schedule SelfControl, or otherwise schedule Internet accessibility, using an AppleScript or otherwise, in order to keep me on track during class? Preferably the solution should be just as "desperate Internet addict"-proof as is SelfControl.

(Full Disclosure: I authored this post during Accounting 1 class.)

5
  • 1
    Why are you don't using cron service to scheduling your jobs? Aug 26, 2013 at 13:49
  • Thanks for the suggestion! This is my first Mac. I'm honestly pretty new to all this stuff. Could you point me to some good resources on using cron services? Aug 26, 2013 at 13:53
  • 1
    Sure, You can get main idea from this link: hints.macworld.com/article.php?story=2001020700163714 Aug 26, 2013 at 14:02
  • @SepahradSalour Sir, that's Unix, how about Mac users?(Frankly, I did not understand what the article is talking about.) Apr 12, 2014 at 4:41
  • 1
    @AveMaleficum Mac OSX was based ontop of BSD which was based on UNIX.
    – Jacob
    Apr 12, 2014 at 5:41

1 Answer 1

4
+25

You could do a combination of iCal (suggested here User friendly way to schedule jobs in Mac OS X) and add all the naughty (using this term loosely) places into a daytime (school time) temp host file. So at certain times of the day you swap hosts file. So from 9-4 your host entry for www.facebook.com is 127.0.0.1.

Not the most awesome solution but it will work. Unless you surf via typing in the IP address -- but who does that? ;)

6
  • I must confess, I can't understand your meaning, Sir. What do you mean by temp host file? Apr 12, 2014 at 13:25
  • you have two /etc/hosts files. One hosts file with the sites you would want to suppress while you are in school and are pointing at 127.0.0.1. The other /etc/hosts file is the default one.
    – Jason McD
    Apr 12, 2014 at 22:21
  • It's a good answer and I'll definitely consider it, but I was asking how to schedule Internet access across the board. Can this be done with a host file? Apr 15, 2014 at 21:14
  • 1
    If you setup iCal to run a script to swap the hosts files then you are going to accomplish when you are setting out to do. When you type in a url it's going to resolve via the /etc/hosts file first, then head out to the internet if it can't be found. I do it all the time in the dev. world (minus the scheduling) to achieve different behaviors for the code. True, not the prettiest answer. There are also browser plugins, but those are specific to the browser running. Aka I install a plugin on Firefox and then load Chrome. doh!
    – Jason McD
    Apr 15, 2014 at 21:41
  • Ok, sorry, I wasn't clear. Could you do something like a wildcard in the host file that would disallow access to all websites, not just certain ones? Apr 15, 2014 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .