public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
// 在HttpApplication 类的第一个实例被创建时,该事件被触发。它允许你创建可以由所有HttpApplication 实例访问的对象。
//定义定时器 1
System.Timers.Timer Timer = new System.Timers.Timer(18000000);//50分钟
Timer.Elapsed += new ElapsedEventHandler(Task);
Timer.Enabled = true;
Timer.AutoReset = true;
Timer.Start();
}
void Task(object source, ElapsedEventArgs e)
{
}
使用timer 定义就行 你去找找相关资料
如果是单独在一个页面上的话,可以用JS的settimeout函数实现
timer 有个属性是专门设置间隔时间的!