For each sync item you can define whether your Mac should send an email, a Slack message, go to sleep, shut down or execute an arbitrary script after the sync has completed.
Alternatively, you can define a script that will be executed once after all syncs have completed, either from the status bar 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”.
Hint: 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, please see Control SyncTime with AppleScript.
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.
To create your own script, follow these steps:
- Open the AppleScript Editor (located in /Applications/Utilities).
- 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.
- 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. - Close the “Edit scripts” window in SyncTime. A menu item corresponding to the new file is now available.
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/"))