Ever wanted to control your Mac's sleeping patterns? Apple recently release a tool called SleepX that developers can use to test their apps with sleep and wake states, but you can use it to enforce fine-grained control over sleep and wake activities -- both timing and running an app on a change in state. Here's Apple's description of what SleepX does:
SleepX is a tool for automated sleep/wake testing on Mac OS X. Using SleepX you can set the number of sleep/wake cycles, the delay between cycles, and how long the machine should sleep. See the Quick Start Guide for details.SleepX is available free from the Developer Connection Member Site. You'll need to be a registered developer to login and download the app, but an ADC Online Membership account is free.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060809130203506