Hey - looking to kill any clients which run for more than >30 minutes on Windows; preferably via a batch file/exe.
I know they exist for Linux in shell file sofmr; such as;
#!/bin/bash
# This script will kill process which running more than X hours
# egrep: the selected process; grep: hours
PIDS="`ps eaxo bsdtime,pid,comm | egrep "spamd|exim|mysqld|httpd" | grep " 1:" | awk '{print $2}'`"
# Kill the process
echo "Killing spamd, exim, mysqld and httpd processes running more than one hour..."
for i in ${PIDS}; do { echo "Killing $i"; kill -9 $i; }; done;
Just wondering if anyone has ever found a way to kill clients (via process ID/the program name - OSBot.jar) which exceed the time limit set? (In this case 30 minutes).
This is to kill tutorial island clients which either don't connect to the proxy and/or get stuck - to prevent CPU hogging of the server.
Thanks