Do you mean a cache clearing program like Yasu or Onyx? Also to understand the log clearing process read Running the Mac OS X maintenance scripts. This will give you an idea on the log clearing process.
I want the script to be run in the background so that it will not interact with user.
Once the paged or Clipboard memory reach certain size, it will clean them automatically.
I forgot most of the cron and crontab tasks are with launchd. That launchd reference contains some advice for how to implement it and a few more links to programming.
sorry to dig this up again.
correct me if i'm wrong. I did some reading on crontab and launchd. Its like setting up a "schedule" for some command to run. Now the question is, how am i going to write the actual command/instruction that is going to used for crontab and launchd?
Depends in 10.4.x it is Cron and in 10.5.x it is Launchd. Well it sounds as if you want to take a look at the donationware application Lingon.
Now most of the log rotation in 10.5 is already it OS X and they talk about that in the whole article Running the Mac OS X maintenance scripts. Now clearing the Users Cache is another thing entirely and that is why I listed the freewarewares earlier in the thread (that also do the log rotating as a side benefit.
Thanks for the tip Satcomer. I've downloaded Lingon for 10.4 and I am wondering how am I going to write some custom ProgramArguments. I am thinking of writing and adding in some custom command apart from the one that is already available. Some of the custom stuff I would like such as disconnect all mounted server if leave idea for 15 minutes. Cleaning the desktop after each reboot....etc