I have a C # class. I need to run a copy of it at regular intervals, say 5 minutes. I need to execute this code every 5 minutes without blocking the main thread. I would also like to have a mechanism in which I can stop this process.
Check out the class Timer.
Timer