Every morning I have the same routine.
I come into work and plug in my peripherals including my Time Machine Backup. I have my Time Machine scheduled to only run one daily backup at 3:30pm. I would like to run a script or a .plist LaunchDeamon to check all inserted external hard drives automatically and unmount if the
UUID = 32E89C07-FFDB-36F3-8CE8-5DC0560AFEC4
And then mount it at 3:15pm. I just do not want my drive to be plugged in all day just to use it for 30 mins to back everything up.
I know this could all be resolved if I just manually plug in the drive at 3:15. However, some days I am in a meeting or away from the desk and what-not.
I was able to find documentation on how to auto eject the device at a specific time so I do not have to remember to safely remove the drive.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.diskejector.Backup</string> <key>ProgramArguments</key> <array> <string>/usr/sbin/diskutil</string> <string>unmountDisk</string> <string>32E89C07-FFDB-36F3-8CE8-5DC0560AFEC4</string> </array> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>16</integer> <key>Minute</key> <integer>45</integer> </dict> </dict> </plist>
I would like some help with auto launching a .sh script that could also include the previous code I have to eject the drive at the end of the day.