OS X Tip #138
Mac OS X’s UNIX subsystems were originally written for machines that were typically never shut off. Mac OS X typically runs Cron jobs for scheduled maintenance tasks automatically between 3 am and 5 am. In addition, there are scripts designed to run weekly on weekends, and once a month in the middle of the night. If your Mac is shut down at this time these maintenance tasks are not run. If they are never run, many log files and system database will grow extremely large or fail to get backed up.
During these maintenance tasks your Mac gets rid of old log files, caches, and temp files that can build up, rotates system logs, backs up Netinfo data, cleans the Mail queue, rebuilds local databases and performs several other important tasks. So I think you can see why OS X self help is important.
But what if you Mac is never on during the times OS X is scheduled to run its important maintenance scripts? Never running them is not a great idea as your hard drive fills up with old logs and junk. To keep your Mac running smooth it is a good idea to allow OS X to fix itself. There are ways to allow OS X to get these tasks done without keeping your Mac on all the time.
Here’s how:
Any one of these solutions can assist in getting the job done. Here are my suggestions:
Maintidget
Maintidget (Maintenance Scripts Widget) is a free Dashboard Widget which provides the following functions:
- Display the last time the daily, weekly, and monthly OS X Maintenance Scripts (a.k.a Cron Tasks) were run.
- Run the OS X Maintenance Scripts on demand. Just enter your password and click the Run Scripts button.
- Select which scripts you want to run (the daily script must be run at all times).

Once you have Maintidget installed, just press the F12 key, bring up Dashboard, select the scripts you want to rub, put in your admin password, and the allow Maintidget to have OS X run its maintenance job.
MacJanitor
MacJanitor is a free application provides a way to run these system tasks at the click of a button.

Cocktail
Cocktail, $14.95 is a general purpose OS X utility that is crammed full of maintenance tools and interface tweaks. Included in Cocktail is Pilot that allows you to schedule maintenance tasks.

Also see Tiger Cache Cleaner and Yasu.
Onyx
Onyx is free software that includes S.M.A.R.T monitoring. Onyx includes Safari, allowing you to control such things as the size of your History menu and other settings that aren’t in the Safari Preferences panes. As most such utilities do, it includes running and rescheduling of system cron tasks, verification of disk permissions and rebuilding of Spotlight and the Launch Services database. It can clean out caches and log files and empty your trash. It also has an “Automation” section that does similar tasks and more at the cick of the “Execute” button.
Using Terminal
If you are the UNIX type and want to use the Terminal here is how:
Launch Terminal, located in -> Applications -> Utilities.
At the Terminal prompt, type the following, exactly as written:
sudo periodic daily weekly monthly
Press Return.
Type your Admin password when prompted, then press Return.
All three scripts will run in sequence. There will be no visual feedback while the scripts execute. You will know they are completed when the Terminal prompt returns.
You can also run the scripts individually. For example, to run just the daily script, you would type the command:
sudo periodic daily
To Determine when the maintenance scripts were ran last using Terminal. Use this command:
ls -al /var/log/*.out
You will see output similar to the following:
-rw-r--r-- 1 root wheel 42166 Dec 17 08:57 /var/log/daily.out
-rw-r--r-- 1 root wheel 429 Dec 17 09:02 /var/log/monthly.out
-rw-r--r-- 1 root wheel 1146 Dec 17 09:02 /var/log/weekly.out
 
 
| Tags: mac tips

Subscribe







