Commit b5912416 authored by 黄奎's avatar 黄奎

111

parent 6c53737e
...@@ -11,10 +11,18 @@ namespace EduSpider ...@@ -11,10 +11,18 @@ namespace EduSpider
static void Main(string[] args) static void Main(string[] args)
{ {
var stopTime = 1000 * 60 *2; var stopTime = 1000 * 60 *2;
int times = 1;
//30分钟执行一次 //30分钟执行一次
while (true) while (true)
{ {
var date = DateTime.Now; var date = DateTime.Now;
if (times == 1)
{
Console.WriteLine(string.Format("{0} 执行方法.", date.ToString("yyyy-MM-dd HH:mm")));
//ClassIn数据
new ClassInFlow().StartAsync();
Thread.Sleep(stopTime);
}
if (date.Minute == 0) if (date.Minute == 0)
{ {
Console.WriteLine(string.Format("{0} 执行方法.", date.ToString("yyyy-MM-dd HH:mm"))); Console.WriteLine(string.Format("{0} 执行方法.", date.ToString("yyyy-MM-dd HH:mm")));
...@@ -22,6 +30,7 @@ namespace EduSpider ...@@ -22,6 +30,7 @@ namespace EduSpider
new ClassInFlow().StartAsync(); new ClassInFlow().StartAsync();
Thread.Sleep(stopTime); Thread.Sleep(stopTime);
} }
times++;
} }
Console.ReadLine(); Console.ReadLine();
Environment.Exit(0); Environment.Exit(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment