I want to run this command:
free && sync && echo 3 > /proc/sys/vm/drop_caches && free -m by cron. That way I can free my RAM and cache in an Ubuntu system.
I'm using these steps:
# crontab -e 2 * * * * my_user_name /usr/bin/free free && sync && echo 3 > /proc/sys/vm/drop_$
save & exit
# service cron restart But, when I run free -m nothing changes. For reference, it looks something like this:
# free -m total used free shared buffers cached Mem: 7976 5064 2911 5 169 3478 -/+ buffers/cache: 1416 6560 Swap: 8112 1264 6848
approachit?service cron restartaftercrontab -e.crontab -ewill automatically notifycronthat something has changed. If you found the crontab file, and manually went to it and edited it, you would need to do something to tellcronto reread the modified file (so don't do that — just usecrontab -e).