So I set up a launchd job to flush the DNS cache every four hours. The following was saved at /Library/LaunchAgents/com.agilemarkup.fixDNSCachingIssues.plist, and loaded with launchctl load ...
Got to get me a new router...
<?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>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.agilemarkup.fixDNSCachingIssues</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/dscacheutil</string>
<string>-flushcache</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>14400</integer>
<key>StandardErrorPath</key>
<string>/var/log/dnscacheutil.err.log</string>
<key>StandardOutPath</key>
<string>/var/log/dnscacheutil.out.log</string>
<key>WorkingDirectory</key>
<string>/tmp</string>
</dict>
</plist>
No comments:
Post a Comment