|
#1
| |||
| |||
| AppleScript for some cleaning job
Hello, I am wondering how can write AppleScript to clean: I am new to AppleScript and doesn't know which Services or OSAX or command or Framework to call. -OS X Clipboard -Virtual memory -Paged memory Thanks, Jeno |
|
#2
| ||||
| ||||
|
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.
__________________ Mac Pro Dual 2.8 Quad (1st gen), 14G Ram, Two DVD-RW Drives, OS X 10.6.2 Mac Book Pro Core 2 Duo 2.16Ghz, SuperDrive, ATI X1600, 2GB RAM, OS X 10.6.2 2TB Time Capsule 32G iPhone 3GS Black |
|
#3
| |||
| |||
|
yup, sort of. 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. |
|
#4
| ||||
| ||||
|
How about setting those cleaning tasks in cron?
__________________ MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. ~ Samuel Clemens | Rants | Photos |
|
#5
| |||
| |||
|
cron script will be fine. May I know how to make one?
|
|
#6
| ||||
| ||||
|
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.
__________________ MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. ~ Samuel Clemens | Rants | Photos |
|
#7
| |||
| |||
|
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? Thanks |
|
#8
| ||||
| ||||
|
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.
__________________ Mac Pro Dual 2.8 Quad (1st gen), 14G Ram, Two DVD-RW Drives, OS X 10.6.2 Mac Book Pro Core 2 Duo 2.16Ghz, SuperDrive, ATI X1600, 2GB RAM, OS X 10.6.2 2TB Time Capsule 32G iPhone 3GS Black |
![]() |
| Bookmarks |
| Thread Tools | |
|
|