I'm making a simple scheduler with C# in .Net. All it does is execute a simple select statement on a table in a SQL Server DB once per minute (this does not need to scale or anything... the db does not have a high load). Here is my proposed implementation:
static void Main(string[] args)
{
while (true)
{
System.Threading.Thread.Sleep(timeout); // timeout is, say, 60000
CheckTable();
}
}
Is this ok? What is a better way?
p.s. Someone suggested using the Windows Forms Timer class... however that seems like overkill.
Cheers!