The first thing you’ll be tasked with doing is opening the Terminal, as that’s what you’ll be using to create your computer’s sleep schedule. The Terminal sits within the Utilities folder on your Mac, so find it and open it. The first command will be to set up the sleep times for your Mac. To do this, type into the Terminal the following command:

Make sure to replace the date with whatever day is applicable to the cycle you’re creating using the full “Month/Day/Year” formatting. The time is dictated on a 24 hour clock, so 00:00:00 corresponds to midnight. 12:00:00 is noon, 22:00:00 is 10pm and so on. Now that your Mac knows when to call it a night, it’s time to give it a wake up call. Once again you’ll be working within the terminal to dictate the time. To set the alarm for your Mac, use this command:

This command will ensure that your Mac will be up at the time that you decide for it. Macs don’t have the ability to hit the snooze alarm, so you’ve guaranteed your computer will be awake right when you expect it to be. That’s all there is to it. Your Mac now has a dedicated sleep cycle for the day. You can, of course, duplicate these commands to create a schedule for longer absences. If you’d like to make this command part of your Mac’s daily routine, you can use the “repeat” command. For waking your computer at the same time every day, type this command in the Terminal:

You can choose the days you want this to happen by simply picking the dates out of the command “MTWRFSU”. If you just want the wake to occur on Monday, Wednesday, and Friday, just use the “MWF” part of the command. Similarly, you can repeat the sleep schedule by using the repeat command. To make your Mac take a little nap at the same time every Tuesday, Thursday, and Sunday, you’d type the command as follows:

Now your Mac won’t spend those late nights stirring at all hours and will maintain a consistent cycle of sleep according to your dictation. Image credit: Time