110,533
社区成员
发帖
与我相关
我的任务
分享
<head runat="server">
<title>mytitle</title>
<meta http-equiv="refresh" content="300" />
</head>
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading;
namespace ConsoleApp1
{
class Program
{
static List<string> lst = new List<string> { "http://www.bind.com", "http://bbs.csdn.net/topics/392323038" };
static Timer tmr = new Timer(x =>
{
foreach (var url in lst)
{
Console.WriteLine(DateTime.Now.ToString() + "刷新" + url);
new WebClient().DownloadData(url);
}
}, null, 1, 300000);
static void Main(string[] args)
{
Console.WriteLine("................按任意键结束");
Console.ReadKey();
}
}
}