I would like to use (or write) a timer that I can setup to use with my kids on Mac OS X (Yosemite). The functionality which I would like, which I haven't found off the shelf is:

  • Set the timer for a period, T (e.g. 20 mins)
  • Print a warning to the screen at T-n (e.g 17 mins)
  • Lock the computer at 20 mins
  • Unlock with administrator access only

I've experimented with pmset schedule but it allows the user to override.

Parental controls as currently implemented don't work for this as we want to split their time into smaller units, and more than one kid uses the same login (and I've read that this feature is buggy under Yosemite)

This timer could be started via the command line or graphically.

  • how would the time be set (how does it starts)?
    – Ruskes
    Commented Mar 19, 2015 at 2:41
  • I don't really mind. It could be via the command line, or graphically. Will edit the question to clarify.
    – natke
    Commented Mar 19, 2015 at 20:09
  • I was more thinking of "clever kids" restarting the timer :)
    – Ruskes
    Commented Mar 19, 2015 at 20:16
  • Right. It would need to be protected by an admin password. They haven't quite cracked that yet ;)
    – natke
    Commented Mar 20, 2015 at 2:21
  • Without some custom script, just use the parenteral control and set it to 30 min per user.
    – Ruskes
    Commented Mar 20, 2015 at 2:33

1 Answer 1


I'm far too lazy to implement this, and I don't have kids so have no need, but it would seem imminently possible with a cute python or Terminal script set to start running at login. This post seems to go over pretty well the Terminal logout commands. Couple that with the system time, date, is what you'll want and choose whichever output works best for you. Past that, it's somewhat unclear if you should be able to log in as a user again (just put a password on that account with no admin privileges) or if you want to have an admin log a user with no password in. The latter is probably slightly more difficult to do, but assuredly not impossible.

  • Those could be useful, although ideally the current user would not be logged out, just locked out.
    – natke
    Commented Mar 20, 2015 at 2:24

You must log in to answer this question.

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