Jump to content
Heiko

Looking for Time Machine Tips / Go to sleep after Backup

Recommended Posts

Hey Lepoard users,

 

I want to leave my Mac (MacBookPro) in sleep mode - but not until after Time Machine has completed the backup.

 

Any hints? Or should I write an apple script using a "System Events"-query?

 

Best regards

Share this post


Link to post
Share on other sites

http://www.macosxhints.com/article.php?sto...080627055609571

 

I will try this modified one (sleep instead of shutdown):

 

do shell script

"/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper > /dev/null 2>&1 &"

 

repeat

delay 10

if not IsProcRunning("backupd") then

ignoring application responses

--tell application "loginwindow" to «event aevtshut»

tell application "System Events" to sleep

end ignoring

exit repeat

end if

end repeat

 

on IsProcRunning(theProc)

try

do shell script "ps auxc | grep \"" & theProc & "\""

return true

on error

return false

end try

end IsProcRunning

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing

    No registered users viewing this page.

  • Who's Online (See full list)

    There are no registered users currently online

×