Is there a way to restrict CPU time (duration) for all processes which are invoked by executables that are located in a certain directory?I would like to be able to auto-kill all applications which certain users start in their home directories after a certain amount of time (for example after 10 minutes).
Restricting CPU time of processes by executable path
linux;process;users;limit;cpu usage
What you want is in this answer and this answerThe only thing I'll add is the -u user option for ps eg:ps -u <username>to search processes started by a user.