iRest is a simple OS X application that locks your screen between 8 PM & 5 AM.
While your screen is locked, you can only unlock it by shutting down (by holding down the power button) and then starting up.
While your screen is unlocked, you can kill iRest by entering the following command in Terminal:
killall iRest
To change the screen-lock period:
- Quit iRest.
- Use Xcode to find & replace "8 PM" & "5 AM."
- Product > Archive. Distribute... > Export as Application.