Mac Maintenance

EricNau

Moderator emeritus
Original poster
Apr 27, 2005
10,589
31
San Francisco, CA
OK,
I'm still relatively new to Mac, and I had a question for those of you who know more than me.
On a Windows, you have to perform maintenance tasks, such as de-fragmenting the HDD, etc.
Are there any maintenance type things I should be doing on my Mac, and how do I do them?
Thanks
 

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
Make sure you mac is on at night once and a while. Scripts get run at night. There is a daily, weekly, and monthly script. If you don't leave your computer on, either (1) get a program called anacron that will run the scripts when possible, or (2) change the time of the script. Also, repair permissions once and a while.

Other will tell you of many other programs they run. Most of those programs just run the daily, weekly, and monthly scripts. I say just stick to the basics.
 

CalGrunt

macrumors regular
Oct 21, 2005
104
0
grapes911 said:
Make sure you mac is on at night once and a while. Scripts get run at night. There is a daily, weekly, and monthly script. If you don't leave your computer on, either (1) get a program called anacron that will run the scripts when possible, or (2) change the time of the script. Also, repair permissions once and a while.

Other will tell you of many other programs they run. Most of those programs just run the daily, weekly, and monthly scripts. I say just stick to the basics.
If you're running the newest version of OS X, there's no need to do this anymore. The scripts will run whenever you either start your computer or wake it up. No need to keep it on all night like you used to.

See the following:

http://forums.macrumors.com/showthread.php?t=156767&highlight=scripts
 

EricNau

Moderator emeritus
Original poster
Apr 27, 2005
10,589
31
San Francisco, CA

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
CalGrunt said:
If you're running the newest version of OS X, there's no need to do this anymore. The scripts will run whenever you either start your computer or wake it up. No need to keep it on all night like you used to.

See the following:

http://forums.macrumors.com/showthread.php?t=156767&highlight=scripts
I'm going to test this out. I'll make a launchd command for a soon to be time and then I'll put my computer to sleep. I'll be right back.
 

CalGrunt

macrumors regular
Oct 21, 2005
104
0
grapes911 said:
I'm going to test this out. I'll make a launchd command for a soon to be time and then I'll put my computer to sleep. I'll be right back.
Grapes, ya gotta be running 10.4.1. If you're running 10.4.0, it ain't gonna work.
 

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
CalGrunt said:
Grapes, ya gotta be running 10.4.1. If you're running 10.4.0, it ain't gonna work.
I have 10.4.2. I disabled anancron and it seems to run when a launchd command, but not when in cron. So anacron is still necessary, just not for daily, weekly, monthly, or any other lanuchd command.
 

CalGrunt

macrumors regular
Oct 21, 2005
104
0
grapes911 said:
I have 10.4.2. I disabled anancron and it seems to run when a launchd command, but not when in cron. So anacron is still necessary, just not for daily, weekly, monthly, or any other lanuchd command.
So why is anacron still necessary ??
 

CalGrunt

macrumors regular
Oct 21, 2005
104
0
grapes911 said:
To run my cron jobs that were missed due to sleep or the computer being off.
Are your cron jobs necessary for general computer maintenance ??
 

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
CalGrunt said:
Are your cron jobs necessary for general computer maintenance ??
You ask a lot of questions. :p

What's you definition of "general computer maintenance"? My cron jobs run software update, make backups of important folders and files, clean out certain folders, etc.
 

CalGrunt

macrumors regular
Oct 21, 2005
104
0
grapes911 said:
You ask a lot of questions. :p

What's you definition of "general computer maintenance"? My cron jobs run software update, make backups of important folders and files, clean out certain folders, etc.
Sorry............I'm pretty new to all this myself. I'm still running a G3 on OS 8.6. Got a new iMac comin' in a few days, so I had the same questions as the OP.

I'm totally unfamiliar with cron scripts and such.........but the way I understand it is, the cron scripts that run general system maintenace no longer have to be run in the middle of the night that used to require your computer to be left on, right?
 

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
CalGrunt said:
Sorry............I'm pretty new to all this myself. I'm still running a G3 on OS 8.6. Got a new iMac comin' in a few days, so I had the same questions as the OP.
Understandable. I like learning new things too.

I'm totally unfamiliar with cron scripts and such....
Cron jobs can be anything. If you can do it via terminal (which is almost anything), you can set is as a cron job. Cron has been around in the Unix world for a long time. My guess is that it first got started for maintenance. But all it really is, is a program that runs a terminal command at a certain time. Users have found all sorts of useful jobs for cron.

.....but the way I understand it is, the cron scripts that run general system maintenace no longer have to be run in the middle of the night that used to require your computer to be left on, right?
Cron scripts no longer run daily, weekly, and monthly. Apple developed lanuchd which is similar to cron, but not exactly the same. Launchd is much more powerful. It seems that launchd runs its missed jobs when it wakes (I'm going to test it some more though).

Cron still does exist though. There are no default cron jobs created by Apple. That does not mean that a user cannot add cron jobs to do whatever he or she wants.
 

CalGrunt

macrumors regular
Oct 21, 2005
104
0
One more question:rolleyes:

When launchd runs these scripts, does it totally do them in the background or does it give you some indication that it is running?
 

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
CalGrunt said:
One more question:rolleyes:

When launchd runs these scripts, does it totally do them in the background or does it give you some indication that it is running?
The only way that I know if a job ran is by looking at the logs. Console.app is the easiest way to do it unless you want to use the terminal.
 

EricNau

Moderator emeritus
Original poster
Apr 27, 2005
10,589
31
San Francisco, CA
grapes911 said:
The only way that I know if a job ran is by looking at the logs. Console.app is the easiest way to do it unless you want to use the terminal.
What would one look for in this console.app?
 

grapes911

Moderator emeritus
Jul 28, 2003
6,943
3
Citizens Bank Park
EricNau said:
What would one look for in this console.app?
I'm not on my Mac right now, but I think it is in the Utilities folder.

Edit: read your post wrong. On the left look for a job such as daily. Then look through the log for time stamps.
 

EricNau

Moderator emeritus
Original poster
Apr 27, 2005
10,589
31
San Francisco, CA
grapes911 said:
I'm not on my Mac right now, but I think it is in the Utilities folder.

Edit: read your post wrong. On the left look for a job such as daily. Then look through the log for time stamps.
Thanks - How long do the logs stay there? Is it a time limit thing, or when I shut down my computer, or what?
 

PCheese

macrumors member
Aug 9, 2004
50
0
EricNau said:
How long do the logs stay there?
Basically forever. Part of the purpose of the daily/weekly/monthly scripts is to archive these logs, compressing them so you save space (you'll see some log files ending in .gz). I don't think the scripts ever erase the logs, however. You can do that yourself by getting rid of what you no longer want in ~/Library/Logs/ or /Library/Logs/.
 

vhardono

macrumors newbie
Oct 22, 2005
17
0
Singapore
A program called Onyx will optimize the system and clear any unnecessary files that remain in your mac. Once I launched the program every month, it will free up about 100-200MB unnecessary files.