C# 怎样实现   每隔5分钟执行某个函数一次 ??比如有个 发送email的函数,我通过excel导入进来上万条email,然后,开始群发。为了发送顺利,我要每个5分钟,执行一次发email的那个函数。不知道怎么弄。=================关于.NET 群发email的方法,谁还有什么好的想法,欢迎交流。

解决方案 »

  1.   

    Timer控件 可以解决你的问题.
      

  2.   

    用一个TIMER控件。。每阁5分钟执行一次~
      

  3.   

                Timer tmr = new Timer(1000 * 60 * 5);//5分钟一个循环
                tmr.Elapsed += delegate
                {
                    YourFunction();
                };
                tmr.Start();
      

  4.   

    System.Windows.Forms.Timer

    System.Timers.Timer
      

  5.   

    高分求助!在C#怎么使用timer控件
    http://topic.csdn.net/t/20050329/00/3889493.html
      

  6.   

    用Timer控件,设定其Tick一次的时间,针对其Tick事件编程,在事件中直接调用你想要执行的函数就可以了
      

  7.   

    用timer控件啊,或者用纯种上的timer也可以啊
      

  8.   


            
            Timer t = new Timer(5000);  //5秒钟
            t.Elapsed += new ElapsedEventHandler(aaaa);        t.AutoReset = true;
            t.Enabled = true;
            GC.KeepAlive(t);
          public void aaaa(object sender, ElapsedEventArgs e)
        {
            //要处理的代码
        }