Action after all syncs have completed

You can define whether your Mac should go to sleep or shut down after all syncs have completed and also execute arbitrary scripts.

  1. Open the AppleScript Editor (located in /Applications/Utilities).
  2. Create appropriate AppleScripts by copying the codes given below (or writing your own scripts) into the Editor and saving them on the Desktop with a meaningful name.
  3. Open the scripts folder from the status bar menu by selecting “Once all syncs are completed > Open scripts folder in Finder”. (The scripts folder is located at “/Users/yourusername/Library/Application Scripts/org.desairem.uSync”.) Move the newly created files into this folder via drag and drop.
  4. Restart SyncTime. A menu item corresponding to the file you’ve just created is now visible.

Codes

Sleep:

tell application "System Events" to sleep

Shut down:

tell application "System Events" to shut down

Play a sound with a given filename (you may store your custom sounds as well in “/Users/yourusername/Library/Application Scripts/org.desairem.uSync”):

do shell script "afplay /System/Library/Sounds/Glass.aiff"

Play a random sound from “/System/Library/Sounds”:

do shell script "afplay /System/Library/Sounds/" & some item of paragraphs of ((do shell script "ls /System/Library/Sounds/"))