You could make a chrontab or a script for:
The answer to this relates as the same answer to the question above about what risk is in using Bleachbit or... in this case Over-using bleachbit.
When you are actively using a machine, files that you are using, if not directly accessing, are stored in RAM and in Temp files.
Clearing these out while you are actively running a process is dangerous. It can corrupt files, cause data loss and crashes.
Clean space and clear RAM when needed. Not constantly.
Relying on a script can cause the RAM to auto-clear out at a very poor time, should you forget about the script.
It is far better to take a small break when you notice some High RAM or need to clear some space, take care of that, then resume working.