10.11.3 - launchd to start a job either at startup or at time of day
You should be able to control this with two different launchd jobs.


one job to start daily at 8 am 
another job to unload the first at quitting time (8 pm)


If the application doesn't expect to be loaded/unloaded (like mongodb does if you install it from homebrew), then change the second script to call your "kill" script.


How do I create an AppleScript that will quit an application at a specific time and then put the computer to sleep?
Applescript app to shut down Mathematica at a specific time of day


I'm of the mind to just call /usr/bin/killall SelfControl if that works rather than mucking with wrapping a mode convoluted AppleScript example with /usr/bin/osascript like in the example here:

/usr/bin/osascript -e 'tell application "Mathematica" to quit'


This is far more robust than making a helper script that needs to stay running since launchd keeps track of the time that passes when powered off and/or sleeping and should fire things later (say 23:30) if you wake the Mac from sleep starting at 6 pm.

I use LaunchControl or Lingon app to manage my plist files - but you can hand roll them too like your question.

The second is shorter, so I've named it org.you.control.unload and it simply calls launchctl unload org.you.control.load at 20:00 and set the RunAtLoad to /false so it only triggers per the clock.

&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;org.you.control.unload&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;launchctl&lt;/string&gt;
        &lt;string&gt;unload&lt;/string&gt;
        &lt;string&gt;org.you.control.load&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;StartCalendarInterval&lt;/key&gt;
    &lt;dict&gt;
        &lt;key&gt;Hour&lt;/key&gt;
        &lt;integer&gt;20&lt;/integer&gt;
        &lt;key&gt;Minute&lt;/key&gt;
        &lt;integer&gt;0&lt;/integer&gt;
    &lt;/dict&gt;
&lt;/dict&gt;


Just decide on the names you want: org.you.control.load or ** my.selfControlScheduler** are both fine, but pick an idiom and stick with it throughout.

Your startup plist looks fine but there could be permissions or other issues that a tool to debug things without needing a handy reference like http://launchd.info

Rather than script the opening of the app, just call /usr/bin/open -a SelfControl would be my suggestion if yours isn't working presently.

&lt;string&gt;org.you.control.load&lt;/string&gt;
&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
    &lt;string&gt;/usr/bin/open&lt;/string&gt;
    &lt;string&gt;-a&lt;/string&gt;
    &lt;string&gt;SelfControl&lt;/string&gt;
&lt;/array&gt;