Watch for such system events as waking from sleep, program launches, closes, or switches, file modifications, incorrect password attempts, mouse and keyboard input, and many more. Then, perform any number of tasks like sending an e-mail, shutting down the computer, starting a simulated self-destruct, pinging a web URL, taking a web cam shot, taking a screenshot, playing a multimedia file, speaking some text, executing a shell script... the list goes on! ..edited from Digital Sentry
Your system event was probably the Energy Saver in System preferences going to sleep. I always check never (display sleep and computer shutdown) before a install. System events could include MobileMe, Time Machine, Mail etc…
Hope this helps.
-Larc