You can run a thread in the backhand of the web site. This thread can send the sms in time. Or you can use windows service, which also will send the sms in time.
Example of a windows service, how you can send sms.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.ServiceProcess;
using System.Text;
using System.IO;
using WindowsServiceDemo.Data;
namespace WindowsServiceDemo
{
public partial class Service1 : ServiceBase
{
public Service1()
{
InitializeComponent();
}
System.Timers.Timer testTimer = new System.Timers.Timer();
protected override void OnStart(string[] args)
{
testTimer.Enabled = true;
testTimer.Interval = 1000;
testTimer.Elapsed += new System.Timers.ElapsedEventHandler(testTimer_Elapsed);
}
private void testTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
}
protected override void OnStop()
{
testTimer.Enabled = false;
}
}
}