Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- using System.Threading;
- namespace SeriesAmountController
- {
- class Program
- {
- static void Main(string[] args)
- {
- while (true)
- {
- Thread.Sleep(60 * 100);
- var time = DateTime.Now;
- if (time.Hour == 2 || time.Hour == 3 && time.DayOfWeek != DayOfWeek.Friday)
- {
- var psi = new ProcessStartInfo("shutdown","/s /t 0");
- psi.CreateNoWindow = true;
- psi.UseShellExecute = false;
- Process.Start(psi);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement