It involves the following 2 steps (see example below):
1. Create a plist (property list) file
2. Load the batch job using launchctl
Example
1. Create a plist (property list) file
The following example runs FFS daily at 19:00. Note: the value of the 'Label' key can be anything, but the format shown is preferred (for subsequent identification - see 'launchctl list' below).
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!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>local.FreeFileSync.Personal</string>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>19</integer>
<key>Minute</key>
<integer>0</integer>
</dict>
<key>ProgramArguments</key>
<array>
<string>/Applications/FreeFileSync.app/Contents/MacOS/FreeFileSync</string>
<string>/Users/mjf2708/Documents1/FreeFileSync/Personal.ffs_batch</string>
</array>
</dict>
</plist>
2. Load the batch job using launchctl
Run the following from Terminal:
launchctl load ~/Library/LaunchAgents/local.FreeFileSync.Personal.plist
To check the status of the job, type:
launchctl list | grep local.FreeFileSync.Personal
It will return something like
789 0 local.FreeFileSync.Personal
(There is an extensive launchd tutorial here: https://www.launchd.info)