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

10.3: Use Energy Saver to run system maintenance tasks UNIX
I don't know if this stating the obvious, but with the new Schedule feature in the Panther Energy Saver System Preferences panle, you can now set your machine to automatically turn itself on and off at any given hour. This is handy for running those 4am cron tasks if you don't want to rely on third pary apps such as MacJanitor or Cocktail.

[robg adds: Looking at the /etc/crontab file in 10.3, the daily task runs at 3:15am; the weekly task runs at 4:30am each Saturday, and the monthly task runs at 5:30am on the first day of each month. You could fairly easily use Energy Saver to have your machine wake up for the daily task, but if you wanted to cover the weekly and monthly tasks as well, you'd have to leave it on from 3:15am until probably 6:00am every day ... so it might make more sense to use one of the other tools to run the weekly and monthly tasks at different times.]
  • Currently 2.00 / 5
  You rated: 2 / 5 (6 votes cast)

10.3: Use Energy Saver to run system maintenance tasks | 6 comments | Create New Account
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: fletcherpenney on Dec 08, '03 11:36:10AM

Instead of leaving the machine on for 3 hours, you could also simply alter the crontab so that the tasks ran at 3:15, 3:30, and 3:45 (or whatever).... The idea is to spread the load around, rather than running them all at 3:15, but you could probably do that as well ( though I have not checked to see if the daily, weekly, and monthly scripts would interfere with each other if run simultaneously...)

You don't NEED to use MacJanitor or any of the other tools, they are there simply as an option. The key is to run these maintenance tasks once in a while!

[ Reply to This | # ]
10.3: Use Energy Saver to run system maintenance tasks
Authored by: brain13 on Dec 08, '03 11:46:10AM

or edit your crontab file through the terminal or using maintain (freeware) and get a reasonable schedule for this tasks....

[ Reply to This | # ]
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.

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

[ Reply to This | # ]
10.3: Use Energy Saver to run system maintenance tasks
Authored by: mnoel on Dec 08, '03 11:33:28PM

I'd love to use the Energy Saver this way, but it only wakes up some times. As often as not the machine never wakes up, or goes immediately back to sleep.

Are you actually using this, reliably?

[ Reply to This | # ]
Authored by: rohanl on Dec 09, '03 06:14:37AM

I use anacron

Unlike cron, instead of specifying exactly when jobs are to be run, you specify how often they should run (in days). It then takes care of running the jobs at the right interval when your machine is turned on.

[ Reply to This | # ]
10.3: Use Energy Saver to run system maintenance tasks
Authored by: Sidtech on Dec 18, '03 11:17:42PM
I use CronniX (Google it). It's a great way to edit your crontab graphically, no terminal. I simply changed the night times to times when my computer is running. You can also add the disk utility command by creating a new item and using
diskutil repairPermissions / >> ~/PermissionsLog.txt
as the command. Replace the second path with whatever location you want for the results (what you see in the Disk Utility window).

[ Reply to This | # ]