Nope. No easy way. If you cannot predict when or where an even will happen then you will have no way to address this in code. If it is tied to a particular state of data and occurs with some degree of predictability based upon information input or the state of the data already in the system then you have a very high likelihood of being able to handle these predictable random events.
I cant use this function because this function needs RDP Agent to run on the server.
With RDP Agent running on the server I cant run more than 5 Vusers at a time. because rdp agent takes about 20% of the CPU usage on the server.