01.
protected
void
Page_Load(
object
sender, EventArgs e)
02.
{
03.
04.
if
(!IsPostBack)
05.
{
06.
counter = 0;
07.
t.Interval = 3600000;
08.
t.Tick +=
new
EventHandler(Timer1_Tick);
09.
t.Enabled =
true
;
10.
}
11.
}
12.
13.
14.
15.
protected
void
Timer1_Tick(
object
sender, EventArgs e)
16.
{
17.
try
18.
{
19.
while
(
true
)
20.
{
21.
var currentTime = DateTime.Now.ToString(
"HH:mm"
);
22.
23.
if
(currentTime.Contains(
"09:30"
))
24.
{
25.
getDataReport();
26.
27.
}
28.
}
29.
}
30.
catch
(Exception exception)
31.
{
32.
Console.WriteLine(exception);
33.
}
34.
35.
}