I would like to create shell that could be called from cron to find all running java processes by their given PID that are older than 4 hours from the current time:
ps -ef |grep java....(time > 4hrs + current)
Moreso, I would like to have the shell kill all said processes .
I'm up on the cron, but having trouble developing the shell. Any ideas would be greatly appreciated.