static void Main(string[] args)
        {
            RegisteredWaitHandle handle1 = TaskScheduler.ScheduleDelayedJob(new PrintJob(), "hello", new TimeSpan(0, 0, 2));
            RegisteredWaitHandle handle2 = TaskScheduler.SchedulePeriodicJob(new PrintJob(), "hi", new TimeSpan(0, 0, 1));

            Thread.Sleep(5000);

            handle2.Unregister(null);
            Thread.Sleep(3000);
        }