Clean after all programs have closed

I don't think this has been mentioned before. I was wondering if there would be an option to have CCleaner clean after detecting all the programs on the computer has been closed. You could also add exceptions. For example,before I shut down my computer, I close all programs that are shown in the task bar, but for some reason not programs running in the tray. It would skip those and still run automatically.

it is better if you run CCleaner manually and set it to shutdown when the cleaning complete

you can do that by go to Option > Advanced > select "Shutdown after cleaning"

or you can follow this http://forum.piriform.com/index.php?showtopic=16551