Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.3: Use Energy Saver to run system maintenance tasks' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Use Energy Saver to run system maintenance tasks
Authored by: luhmann on Dec 08, '03 12:07:08PM
I submitted this as part of a longer hint which never got published for some reason. I drew on an earlier hint to explain how this feature could be used to run "fix permissions" as part of your daily, or weekly script:

What I have done is modified the daily maintenance task (already set to run at 3:15am every day) to also run disk permissions. The program "/etc/periodic/500.daily" looks for a file "/etc/daily.local" when it runs. If it finds this file, it will perform whatever commands are contained inside. However, to begin with the file doesn't exist. To create it you need to open the terminal and type:

cd /etc/
sudo pico daily.local
diskutil repairPermissions / >> /var/log/daily.out
control-O to save out, hit enter
control-X to exit
sudo chmod +x daily.local


That should be all you need to do. From then on, your permissions will be fixed every single night (if they need fixing). You can see what is done by reading the output in your "/var/log/daily.out" file from within the console. (Another OS X 10.3 improvement is the ability to easily read logs in the console.) If you like, you can similarly modify the weekly script (if you feel that fixing permissions daily is too much). I'm very happy about the new schedule feature, although I do wish they allowed more flexibility and control - especially so that I could set separate times to wake up for daily maintenance and for running weekly backups, etc.

NOTE:
Discussion about my modifications to the hint are in the forum here: Daily Scripts - how to make them fix permissions?

[ Reply to This | # ]