Select Page

Firstly you must create an xml plist file defining the path of the script and parameters. This file is put into ~/Library/LaunchAgents/ Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
      <string>~/Application Scripts/</string>
      <string>-p param -f file</string>

In this example the only things you need to change are

  • ~/Application Scripts/ Change this to the path of your script.
  • -p param -f file: Change this to the parameters to send to the script

You will also need to set the permissions correctly.

chown root:wheel ~/Library/LaunchAgents/
chown root:wheel ~/Application Scripts/
chmod +x ~/Application Scripts/
Skip to toolbar