using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace Push
{
    class Program
    {
        public class PushTime
        {
            public DateTime time;
            public int morning;
            public int Afternoon;
        }
        private PushTime time = new PushTime();
        static void Main(string[] args)
        {
            Console.OutputEncoding = System.Text.Encoding.UTF8;
            Environment.SetEnvironmentVariable("needDetails", "true");
            Console.OutputEncoding = System.Text.Encoding.UTF8;
            Environment.SetEnvironmentVariable("needDetails", "true");
            System.Console.WriteLine("Hello Push!");
            Thread t = new Thread(new ThreadStart(SetCensusURL));
            t.Start();
        }
        private static void SetCensusURL()
        {
            int n = 0;
            while (true)
            {
                Thread.Sleep(60 * 1000);
                n += 1;
                WebClient web = new WebClient();
                web.Encoding = Encoding.UTF8;

                try
                {
                    string seturl = "http://12345.shangqiu.gov.cn:8819/WorkOrder/SmsOverTime";
                    string Dataurl = web.DownloadString(seturl);//这一句话就能请求到数据了
               //     System.Console.WriteLine(Dataurl);
                }
                catch
                {
                }
            }
        }
    }
}

