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


Click here to return to the 'Check system maintenance tasks at startup' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Check system maintenance tasks at startup
Authored by: elmimmo on Mar 18, '05 11:57:14AM

Unfortunately this does not solve the problem for those who do NOT turn their computers off but have them sleeping at default system maintenance hours.

XJanitor is dead easy to set up AND does exactly the same as anacron, except that it is intended ONLY to make sure the system maintenance are carried on (while I guess you can use anacron for whatever other cron jobs too) whether your computer was off or *sleeping* at the default hours and without stressing your computer more than needed.

You just place the perl script somewhere on your hard-drive (/Library/Application Support or whatever), edit your system crontab with a single line and it gets the job done.

Besides, you can control wether you want to turn system maintenance temporarily off (so that it does not trigger at some unfortunate time when you need full processing power) and you can make sure it does not run when running your notebook on battery.

By its description, I guess one can make anacron do the same as XJanitor. I simply know only the latter. In any case, it is at least as easy (or even easier) to setup as this hint, and useful to a broader audience than the audience of this hint

.

[ Reply to This | # ]
Check system maintenance tasks at startup
Authored by: ld on Mar 21, '05 09:42:56PM

Hi there,

you're right. It doesn't help (on its own) for those who leave their laptops on. It wasn't meant to be a one-size-fits-all tip. But something that I decided to use. I'm a programmer and so like to find (and in so doing learn) ways of doing things myself rather than simply pull down a ready-made tool. Ready-made tools don't teach you about the system.

So, If there's other tools out there that fit the bill for your purposes - that's great. Having a choice is good. The other good thing about all the feedback is seeing where this type of hint could be improved. That's the great thing about this forum.

Anyway, the /Library/StartupItems is a standard built-in system tool. I was interested in putting something into place that met the following criteria:

  1. Compliments the stock system tasks (i.e., without removing/replacing them)
  2. Uses the log files produced by these tasks to verify their execution

If the thing that's missing is, "may not run if sleeping rather than rebooted" then it would only take a little more creativity to fit that bill... (e.g., setting an hourly cron job that kicks off the startup item).


@hourly /Library/StartupItems/Periodic/Periodic "start"

And only a little bit more creativity is required to enable you to turn this feature off for specific times of high-volume processing... e.g., create an AppleScript that's available from your Script Menu that will toggle the renaming of the StartupItem script (placing a script with the name Periodic in the right place so that the cron job doesn't get upset. (Left as an excercise for someone who's got a bit of spare time.)

---
regards,
LD

[ Reply to This | # ]