Auto terminating processes in HPUX

We are runing HPUX on a 7400 server.

Some of our users are sitting in records for hours at a time and locking essential records or tables (A discipline issue I know, and I'm working on it.... However).

Does anybody know of a way to automatically terminate processes that have been idle for a given period?

determine the PID of the proccess you wish to kill, then decide how long until you want to kill the process, ie: sleep 5m && kill <pid>.

how you figure out what pid you want to kill though is up to you. you may have to have some type of script that would check the output of ps for the proccess you want to kill, like grep for the string, if grep returns 1 (or whatever it returns when it finds your search string) then you initiate the sleep command for your given amount of time.