I am running OS X 10.8 (Mountain Lion). I was wondering if there is a terminal command to check if macbook pro lid is closed now. If I used grep, what would I look for exactly and where?
The reason I'm asking is because I have a cron job that should run every 30 minutes. However, crontab does not start when the computer is sleeping / asleep. My solution was to use pmset to plan wakeups every 30 minutes. However, I need my computer to sleep again, provided that the cover is currently closed. I donβt want my computer to wake up for too long with the lid closed, that is, sleep all night when I sleep, because it can damage the screen.
source
share