Action after sync completion

For each sync item you can define whether your Mac should send an email, a Slack message, quit SyncTime, go to Sleep, shut down or execute an arbitrary script after the sync has completed. You can find this option in the Advanced tab of the sync item settings.

Alternatively, you can define a script that will be executed once after all syncs have completed, either from the status icon menu, the File menu or the main window context menu. This general script is executed only once and then reset to the default No custom script.

Tip: if you want to execute a script every time all syncs have completed, at the beginning of the script you can send a command to set the script again. For additional help, see Control SyncTime with AppleScript.

Install predefined script

SyncTime offers a selection of scripts that you can automatically install in your user scripts directory. macOS only allows scripts inside this directory to be executed. You can also create your own scripts, or edit the installed scripts.

  1. Open the Edit scripts window, either from the status bar menu or the main window context menu by selecting Once all syncs are completed > Edit scripts.
  2. Click the Download button beside the desired script.
  3. Click Save to confirm the install location.
  4. Close the Edit scripts window. An item corresponding to the new script is now available throughout the app.

Install custom script

  1. Open the AppleScript Editor (located in /Applications/Utilities).
  2. Create an AppleScript by copying one of the codes given below (or writing your own) into the Editor and saving it on the Desktop with a meaningful name.
  3. Open the Edit scripts window in SyncTime, either from the status bar menu or the main window context menu by selecting Once all syncs are completed > Edit scripts. Then click on Open scripts folder in Finder. (The scripts folder is located at /Users/yourusername/Library/Application Scripts/org.desairem.uSync.) Drag the newly created file into this folder.
  4. Close the Edit scripts window in SyncTime. An item corresponding to the new file is now available throughout the app.

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/"))
  • Quit SyncTime
tell application "SyncTime" to quit