Make Sure Scheduled Maintenance Tasks Run

Mac OS X includes a tiny Unix utility called periodic whose purpose is to perform a variety of cleanup tasks, such as deleting old log files that would otherwise take up unnecessary space on your disk and updating the index that the Unix locate command uses to find files in the Terminal utility. The periodic utility can perform any of three sets of tasks. Once a day, periodic is supposed to run "daily" tasks; once a week, "weekly" tasks; and once a month, "monthly" tasks. (These names are more or less arbitrary; if, for example, you ran the monthly tasks every week, no harm would result.)

The periodic program doesn't launch itself, though; running it at the proper times is the job of another program, called launchd (under Tiger; in earlier versions of Mac OS X a utility called cron told periodic when to run). Apple set the launchers to run the periodic scripts in the middle of the night, so that they wouldn't slow down other things your Mac might be doing. The problem is that if your Mac happens to be off or asleep at the scheduled time (as it is for most of us), the scripts can't run. Tiger's launchd utility was supposed to be smart enough to notice that it had missed a scheduled task and run it the next time your Mac became active. Unfortunately, as of Mac OS X 10.4.4, launchd is flaky: sometimes the periodic scripts run (though possibly at completely unpredictable times) and sometimes they don't.


To learn more about launchd, which is quite useful despite its limitations, see an article I wrote for Macworld magazine: "Launch Your Mac" at

In short, unless you leave your Macintosh on and awake all the time, the periodic command needs a bit of help to do its thing. The easiest solution is to download any of several programs that enable you to run the maintenance scripts manually at any time or, in some cases, to schedule them for times you know your Mac will be available. Try one of these:

  • Anacron: This free utility runs the maintenance scripts whenever they're overdue, with no user intervention required. You can find it at

  • Cocktail: Cocktail (; $15), shown in Figure 4, provides a single, simple interface for performing a wide range of maintenance tasks, including running the maintenance scripts, deleting cache files and old logs, adjusting hidden Finder, Dock, Safari, and Exposé settings, and more. Some tasks can run on a recurring schedule.

    Figure 4. Cocktail's System pane contains controls for running the daily, weekly, and monthly maintenance scripts. You can also use the Pilot pane to schedule them to run automatically.

  • Mac HelpMate: This utility (; free, donations accepted) can run the maintenance scripts manually or on a schedule. It also deletes various caches, adjusts hidden Finder and Dock settings, displays your drives' S.M.A.R.T. status (see Check Your Drives' S.M.A.R.T. Status, page 82), disk usage and system uptime, and performs numerous other maintenance tasks.

  • MacJanitor: If you want nothing more than a simple utility that lets you run the daily, weekly, and monthly maintenance scripts manually, the free MacJanitor ( does that nicely.

  • MainMenu: Like most of the other utilities in this list, MainMenu (; free, donations accepted) performs a wide variety of functions, including running the maintenance scripts, clearing caches, and deleting log files. Unlike the others, it puts all these commands into a single, always-accessible menu, so that you can run any of them with a single click.

  • OnyX: Another multipurpose utility, the free OnyX can run the maintenance scripts manually (but not on a schedule), delete various caches and log files, adjust hidden Finder, Dock, and Safari settings, display log files, run Unix commands, and display disk usage and system uptime, among other tasks (

Warning! The utilities I list here are among dozens of tools that provide a pretty GUI wrapper to Unix commands. With all such programs, you should be careful not to click buttons blindly; because Unix commands can theoretically do just about anything, you could cause damage if you don't know what you're doing.

Real World Mac Maintenance and Backups. Industrial-Strength Techniques
Real World Mac Maintenance and Backups. Industrial-Strength Techniques
Year: 2004
Pages: 144 © 2008-2017.
If you may any questions please contact us: