Skip to content

Instantly share code, notes, and snippets.

@infotexture
Last active January 3, 2016 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save infotexture/8506763 to your computer and use it in GitHub Desktop.
Save infotexture/8506763 to your computer and use it in GitHub Desktop.
Sample Mac OS X `launchd` script to run DITA builds once at 9AM and every hour thereafter
<?xml version="1.0" encoding="UTF-8"?>
<!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>net.infotexture.autobuild_workdays</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/username/projectdir/scripts/run-dita-build.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartCalendarInterval</key><!-- ◄ Start job at specified times -->
<dict>
<key>Hour</key>
<integer>9</integer> <!-- ◄ Start at 09:00 AM -->
<key>Minute</key>
<integer>0</integer>
</dict>
<key>StartInterval</key> <!-- ◄ Start job in regular intervals -->
<integer>3600</integer> <!-- ◄ Start every 3600 seconds (1 h) -->
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment