Macaroni runs automatically after it has been installed. So, as soon as the installer finishes, Macaroni is "on the job", and will handle system maintenance for you.
Macaroni includes a maintenance job that can be used to remove language-specific localized files from your Mac. This job needs to be configured before it will do anything, because you need to tell it which languages you want to keep and which ones you want to remove. You configure this job by first going to Macaroni's main window, double-clicking the job, and then clicking the Configure tab. The window that appears will tell you how to configure the job.
Once Macaroni is installed, you can see its main window by running System Preferences. In System Preferences, you'll find the Macaroni icon in the bottom row. Click on it to get Macaroni's main window.
Macaroni's main window displays a list of scheduled jobs, which indicates the last time each job was run. It's the starting point for checking on recent maintenance, changing Macaroni's schedule, configuring the "remove localized files" job, and creating your own maintenance jobs.
If you select one of the jobs, the lower part of the window will show the results of the most recent run.
If you double-click one of the jobs, you can change the job's schedule, schedule restrictions, and configuration, as described below.
When you double-click a job in the main window, the first thing that appears is the schedule window. Jobs can be scheduled to run on one of the following schedules:
- Daily: Once a day
- Weekly: Once a week on a specific day of the week.
- Monthly: Once a month on a specific day of the month.
- At regular intervals: Once every "N" days, where "N" is a number you choose.
- When the Mac wakes up: Variable schedule depending on when your Mac sleeps and wakes.
Some maintenance tasks can keep the Mac very busy while they're running.
Macaroni tries to do its work without slowing down the Mac while you're using it. It does this by waiting for idle time. Macaroni tries to wait until the system is idle, similar to the way a screen saver waits. If a job is due, but you're in the middle of working on something, Macaroni will hold back until it looks like you've taken a break for a few minutes. Normally Macaroni waits until the Mac has been idle for at least 5 minutes.
Macaroni also tries to avoid running down batteries. If you're using a PowerBook or an iBook, Macaroni won't run scheduled jobs unless the Mac is plugged in. This keeps your battery life looking good.
If you'd prefer that Macaroni not wait in these situations, you can change Macaroni's configuration in the "Schedule Restrictions" window shown at right. Changes to schedule restrictions can apply to just one job, or to all scheduled jobs.
Most Macaroni jobs do not need to be configured. The only exception is the "Mac OS X Remove Localized Files" job, which will not do anything useful until it has been configured. To configure this job, double-click it in the Macaroni preference pane. In the window that appears, click the "configure" tab. The window shown at right will appear.
The top portion of the window shows information and instructions about configuring the job. The bottom portion is where you select your configuration. Select languages which you would like to remove from your Mac. If you want to remove most, but not all languages, the easiest way to configure the job is to click "select all", and then go back and un-check the languages that you want to keep.
Please be very careful with your selections. Some languages have multiple entries, including one that covers all of the others. For example, French shows up with choices for France, Canada, Belgium, Switzerland, and "tout" (all). If the "all" choice is selected, them all versions of French will be removed, even if others like French Canadian are un-checked. There are several languages like this, which have been set up this way to give you maximum flexibility in choosing which languages to keep.
It is not possible to remove US English files, because Mac OS X requires these files in order to work properly.
If you want to create a new scheduled task, click on the "New Job" button. The schedule window will display.
Each scheduled job requires four details:
- Name. This is whatever you want to call the task
- Script to run. This is a program or Unix shell script that the job will run. See below for some tips on how to get the right command for your job.
- Log File. This is where the job's output is stored. Log files are required, even if your job doesn't produce any output. It's customary to put the logs in /var/log, but you can put them anywhere you like.
- Schedule. This defines when the task should run. Choose one of the four schedule types. Note that if you choose a monthly schedule, and a scheduled day of month of 29 or greater, the task may not run every month.
Tips on setting the command:
The command you enter needs to be something that you can run from the Mac OS X command line (we're planning a drag-and-drop interface here, but for now it's all command-line style). Most custom jobs that people have created fall into one of these categories:
- Unix script. Any script runnable from the Mac OS X command line. Enter the full path to the script, with any command-line arguments. If it's possible that the script will not have "execute" permissions, enter the path to the script interperter, followed by the path to the script. For example, to schedule a Perl script named /Users/me/myscript.pl, and you need to specify an agrument of "-x" to your script, you'd enter:
/usr/bin/perl /Users/me/myscript.pl -x
/bin/foo -z
/usr/bin/open /Applications/TextEdit.appAn important detail to keep in mind is that Mac OS X applications and AppleScripts will usually not work unless somebody is logged in to the computer.
Example
Suppose you want to make sure that your Mac's clock is always as accurate as possible. If your computer is usually on the internet (for example, you have DSL or a cable modem), you can use a network time server. Of course, Mac OS X already uses network time servers, but the standard setup can wait as long as 36.4 hours between checking. However, using the command line, you can set the time from a network time server anytime you like, with the "ntpdate" command. And since you can do it from the command line, you can have Macaroni do it for you. So you could set up a job with the following information:
| Name | Set time from network |
| Command | /usr/sbin/ntpdate -bvu |
| Log File | /var/log/ntpupdate.log |
| Schedule | When the Mac wakes from sleep |
