Skip to content

Instantly share code, notes, and snippets.

@evilmarty
Last active December 12, 2015 09:08
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 evilmarty/4748787 to your computer and use it in GitHub Desktop.
Save evilmarty/4748787 to your computer and use it in GitHub Desktop.
Periodically update homebrew once a week.

Simply add this to ~/Library/LaunchAgents/homebrew.mxcl.update.plist and run launchctl load ~/Library/LaunchAgents/homebrew.mxcl.update.plist.

<?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>homebrew.mxcl.update</string>
<key>ProgramArguments</key>
<array>
<string>brew</string>
<string>update</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>0</integer>
<key>Hour</key>
<integer>3</integer>
<key>Weekday</key>
<integer>1</integer>
</dict>
<key>StartInterval</key>
<integer>604800</integer>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment