3

I'm running OS X 10.8 (Mountain Lion). I was wondering if there was a terminal command to check if the macbook pro's lid is currently closed.

The reason I ask is because I have cron jobs scheduled to run every 30 minutes. However, crontab doesn't run when the computer is sleeping/hibernating. My solution was to use pmset to schedule wakes every 30 minutes. However, I need a way to put my computer back to sleep on the condition that the lid is currently closed. I don't want my computer to be awake for too long with the lid closed i.e. awake all night when I'm sleeping because that could damage the screen.

Michael Wu
  • 163
  • 7

1 Answers1

0

I use Caffine to keep my Mac awake. You can set it for a specific time period. Then have it stop, or shut down your computer.

bret7600
  • 217
  • 3
  • 10