SHARE
TWEET

Untitled

a guest Dec 14th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Diagnostics;
  3. using System.Threading;
  4.  
  5. namespace SeriesAmountController
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             while (true)
  12.             {
  13.                 Thread.Sleep(60 * 100);
  14.                 var time = DateTime.Now;
  15.                 if (time.Hour == 2 || time.Hour == 3 && time.DayOfWeek != DayOfWeek.Friday)
  16.                 {
  17.                     var psi = new ProcessStartInfo("shutdown","/s /t 0");
  18.                     psi.CreateNoWindow = true;
  19.                     psi.UseShellExecute = false;
  20.                     Process.Start(psi);
  21.                 }
  22.             }
  23.         }
  24.     }
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top