static void Main(string[] args)
{
Timer tpsTimer = new Timer(CheckForPastDue, null, 1200, 30000);
while(true);
}
public static void CheckForPastDue(Object stateInfo)
{
try
{
Console.WriteLine(DateTime.Now.ToLongTimeString());
// Check for titles past due
string commandText = @"SELECT nl.ID, nl.BookStem, nl.To, n.LastName, n.FirstName FROM narratorlinks nl
JOIN Narrators n ON nl.NarratorStem = n.NarratorStem
WHERE `TO` - INTERVAL 3 DAY <= NOW() AND nl.AudioReceive IS NULL;";
object result = DBOperations.Execute(false, CommandType.Text, null, commandText, null);
...
|