How to automatically make Mac shutdown after Time Machine Backup How can I make my Macbook automatically shutdown after a Time Machine backup?

I have a 40GB worth backup to do but I keep having to cancel it to go to bed. Would be great if I could leave it on to do it overnight.

Any suggestions of how to do this in ML?
I wanted to be able to leave an existing backup to complete, so my approach is a little different.

The backupd process seems only to be running whilst a backup is underway (and for a minute or two afterwards, from what I've observed) so I logged in as root (so that I can (a) see all users' process and (b) trigger a shutdown) and then polled for the process to finish before shutting down.  So:

sudo -s


and enter your password to become root, then:

while ( ps -ef | grep 'backupd$' ); do echo "Still backing up..."; sleep 60; done; shutdown -h +1


to wait for backupd to finish and then shut down.  (I used shutdown -h +1 instead of shutdown -h now just to be over-cautious and give it an extra minute to tidy up or whatever before shutting down.)