Hi all,
I am working on a project where I need to monitor accounts and suspend features associated with them if their deposited balance runs out.
To do this I'm thinking it might be best to have a script running with an infinite loop that constantly refreshes but I'm not sure what kind of strain this might put on the server.
The pseudocode would look something like this:
while (1) {
For each row in database {
If balance <= 0 {
mysql query - account_status = suspended
}
}
}
Please note (obviously) this is psuedocode and not actual code.
I'm just concerned about how I would stop this script timing out, and what kind of impact it would have on server performance?
Is there any better way to do this?
Happy to discuss,
dB