Are there any way to limit CPU of long running task on Linux?
I am managing some servers running Debian. Sometime there are long-running, CPU hogging tasks that eat a lot of CPU so the server becomes unresponsive. Currently, I have to login to the server and manually limit those tasks by nice or cpulimit. I want to ask if there are any script or software that can automatically do the work for me so I can have more free time for beer? Any suggestions are highly appreciated.