1.You should implement this into a windows service application and not into a web (ASP.NET) application, because the web application is activated only if at least one user is accessing it.
2.So the solution is, to implement a windows service application and inside of it you could use Timer like was suggested in the 1st solution above, but better is to use
Thread
and inside of the main thread to use
Thread.Sleep
(to put the thread to sleep for 24 hours) and then to check for Monday like in the example bellow:
TimeSpan pauseTimeSpan = new TimeSpan(24, 0, 0);
TimeSpan weekTimeSpan = new TimeSpan(24*7, 0, 0);
while (true)
{
if(DateTime.Now.DayOfWeek == DayOfWeek.Monday) &&
(workerThread == null || !workerThread.IsAlive))
{
workerThread = new Thread(new ThreadStart(SendEmailNotifications));
workerThread.Start();
Thread.Sleep(weekTimeSpan);
}
else
{
Thread.Sleep(pauseTimeSpan);
}
}