-
Notifications
You must be signed in to change notification settings - Fork 28
/
Program.cs
48 lines (39 loc) · 1.58 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
namespace TaskScheduler
{
class Program
{
static void Main(string[] args)
{
// For Interval in Seconds
// This Scheduler will start at 11:10 and call after every 15 Seconds
// IntervalInSeconds(start_hour, start_minute, seconds)
MyScheduler.IntervalInSeconds(11, 10, 15,
() => {
Console.WriteLine("//here write the code that you want to schedule");
});
// For Interval in Minutes
// This Scheduler will start at 22:00 and call after every 30 Minutes
// IntervalInSeconds(start_hour, start_minute, minutes)
MyScheduler.IntervalInMinutes(22, 00, 30,
() => {
Console.WriteLine("//here write the code that you want to schedule");
});
// For Interval in Hours
// This Scheduler will start at 9:44 and call after every 1 Hour
// IntervalInSeconds(start_hour, start_minute, hours)
MyScheduler.IntervalInHours(9, 44, 1,
() => {
Console.WriteLine("//here write the code that you want to schedule");
});
// For Interval in Seconds
// This Scheduler will start at 17:22 and call after every 3 Days
// IntervalInSeconds(start_hour, start_minute, days)
MyScheduler.IntervalInDays(17, 22, 3,
() => {
Console.WriteLine("//here write the code that you want to schedule");
});
Console.ReadLine();
}
}
}