Esempio n. 1
0
 private void timer_Tick(object sender, EventArgs e)
 {
     if ((int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) == 0) && up || (int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) == 5 && up))
     {
         up = false;
         site.req();
         req.Upload();
         sp.Upload();
         //btc.Upload();
         rate.Upload();
         reqm.Upload();
         increment = 0;
         Console.WriteLine("update: " + DateTime.Now.ToString());
     }
     else if (!up && int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) != 0 && int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) != 5)
     {
         up = true;
     }
 }
Esempio n. 2
0
 public async Task Execute(IJobExecutionContext context)
 {
     if ((int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) == 0 && up) || (int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) == 5 && up))
     {
         up = false;
         RequestMrr    req  = new RequestMrr();
         RequestMinear reqm = new RequestMinear();
         RequestSp     sp   = new RequestSp();
         RequestRate   rate = new RequestRate();
         req.Upload();
         sp.Upload();
         rate.Upload();
         reqm.Upload();
         DeleteDouble();
     }
     else if ((int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) != 0 && !up) && (int.Parse(DateTime.Now.Minute.ToString().Substring(DateTime.Now.Minute.ToString().Length - 1, 1)) != 5))
     {
         up = true;
     }
 }