views:

327

answers:

3

I want to write a custom alarm for a Mac that awakes the mac from sleep. I think it should be done as the Aurora app seems to do it.

What methods/classes do I need to use?

+1  A: 

Your app can sleep the mac and ask it to wake up at a particular time look at Power Manager in the documentation.

set a timer to wake up the computer at some time in the future

Grouchal
+3  A: 

pmset can do what you need, you just need to set up your settings before it goes to sleep

mog
+1  A: 

This can be implemented through IOPMSchedulePowerEvent routine. Unfortunately, the routine requires root access. Authorization to execute privileged operation can be done using the Authorization Services framework. One should read “Authorizing in a Simple, Self-Restricted Application” and “Authorizing in a Factored Application.”.

notnoop