Possible Duplicate:
Receiving power notifications (especially shutdown) on Mac OSX
Hi Guys,
I'd like to be able to log the times that my mac is switched on and off during the day (keeping track of my hours jacked-in). Switched on is easy: I just have a tiny script that writes the time to a logfile when the user logs on, but I can't find a way of record the time that the Mac powers down.
Any Ideas? I'm not particularly bother about non-standard shutdowns and the like, just really want to get a small script to run on shutdown...
Thanks,
Joe