A script or a way to sched nightly mounting of external HD?

Discussion in 'Mac Basics and Help' started by Learjet035, Mar 1, 2011.

  1. Learjet035 macrumors 6502

    Joined:
    Feb 24, 2005
    Location:
    S. Floriduh
    #1
    I have an external HD that is setup using time machine.

    I notice a delay while the HD spools up from sleep on random occasions throughout the day that I'd like to avoid.

    I don't really need hourly backups, Id just rather have the external drive kick on at night and do a back up.

    Is there a way to do this?

    A script maybe that will mount the drive at midnight or something like that?

    Thank you!
     
  2. patrick0brien macrumors 68040

    patrick0brien

    Joined:
    Oct 24, 2002
    Location:
    The West Loop
    #2
    Schedule the following in iCal should do it. Put the right disk name in here though...

    tell application "Finder"
    delay 2
    if not (exists the disk "REPLACEMEWITHDISKNAME") then
    do shell script "diskutil mount `disktool -l | grep 'REPLACEMEWITHDISKNAME' |
    sed 's/.*\\(disk[0-9s]*\\).*/\\1/'`"
    end if
    end tell
     
  3. Learjet035 thread starter macrumors 6502

    Joined:
    Feb 24, 2005
    Location:
    S. Floriduh
    #3
    Wow awesome!
    Thank you I'll try it when I get home and let ya know.

    Ps. Where exactly do I put that in iCal?

    Thanks
     
  4. Pomeroy macrumors 6502

    Pomeroy

    Joined:
    Sep 27, 2008
    Location:
    Arkansas
    #4

Share This Page