Created
August 8, 2013 15:31
-
-
Save chrisdroukas/6185663 to your computer and use it in GitHub Desktop.
1. Create free.sh
2. crontab -e
3. */30 * * * * /Users/username/free.sh Via http://stackoverflow.com/questions/15216950/how-to-cron-purge-on-mac-os-lion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| free=`vm_stat | grep free | awk '{print $3}'` | |
| freer=${free%%.*} | |
| if [ "$freer" -lt "18000" ] | |
| then | |
| nice purge | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment