I think there is a simpler way to handle this using workflows.
here is how it can be done..
1. Create a sequential workflow with a Delay activity and another activity to send e-mail as needed by your app.
2. Place this inside a while activity with condition set to True
3. In the global.asax.cs file add floowing code for Application_Start event
System.Workflow.Runtime.WorkflowRuntime workflowRuntime = new System.Workflow.Runtime.WorkflowRuntime();
System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService manualService =
new System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService();
workflowRuntime.AddService(manualService);
workflowRuntime.StartRuntime();
Application["WorkflowRuntime"] = workflowRuntime;
ManualWorkflowSchedulerService manualScheduler =
workflowRuntime.GetService(typeof(ManualWorkflowSchedulerService))
as ManualWorkflowSchedulerService;
WorkflowInstance instance = workflowRuntime.CreateWorkflow(typeof(WorkflowConsoleApplication1.Workflow1));
instance.Start();
manualScheduler.RunWorkflow(instance.InstanceId);
in Application_End event add following code:
System.Workflow.Runtime.WorkflowRuntime workflowRuntime =
Application["WorkflowRuntime"] as System.Workflow.Runtime.WorkflowRuntime;
workflowRuntime.StopRuntime();
Assuming Workflow1 is the name of the workflow you have created.
This would be with following advantages
1. Light wait workflow and would not cause any overhead
2. Restarting the asp.net applciaiton would restart the workflow service as well.