Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

Disabling Periodic Scripts

Mac OS X does a little housecleaning in batch processes that run daily, weekly and monthly. These are kicked off by LaunchDaemons that reside in /System/Library/LaunchDaemons and are called com.apple.periodic.daily.plist, com.apple.periodic.weekly.plist and com.apple.periodic.monthly.plist. These need to run and so should not be disabled outright. However, they can disabled temporarily, as when you need a somewhat process intensive script to run for a few days. Therefore, we need a way to disable these and re-enable them.

One could just move those files, but there’s actually a more graceful way. Running defaults read against one of the property lists can be done as follows:

defaults read /System/Library/LaunchDaemons/com.apple.periodic-daily

We could use defaults to go ahead and disable the script by adding a “Disabled=1” key. Or we could unload them using launchctl. You can also do all of this without touching a terminal command. To manage launchd items graphically, look to Peter Borg’s Lingon, available on the App Store or at SourceForge at http://sourceforge.net/projects/lingon. When you open it, simply use the System Daemons in the sidebar and scroll down until you see the com.apple.periodic jobs. Then, uncheck the Enabled checkbox.

When you’re ready to turn ’em back on, re-check the Enabled box. If you don’t re-enable these things though, your computer will get very dirty over time. Similar to how if you never clean your house it will eventually turn on you. So imagine your beautiful pristine Xserve or MacBook Air looking like this:

You have been warned.