Automatically killing a process if it doesn't use any CPU time

Hi,

I'm new to Linux.

I have a windows server that run many processes on it.
In some cases the processes doesn't exit properly or just stop working and the process needs to be killed.

I was wondering how i can automatically (couple of times a day) check which process doesn't use any CPU time and then to kill it.

Any help would be appreciated!

Are these interactive logins where the user goes to shell?

Are you talking about processes on the windows server?

Yes, for example i have a lot of telnet processes that are being opened but not all of them are really active after some time and needs to be killed.