"A" <A@A.COM> wrote in message news:di**********@s1.news.oleane.net...
I try to make a Windows Service that doing some action at each
begin of hour.
Have your Service run a loop that periodically checks to see when
it last did anything useful and, if the hour has changed since then,
do the useful thing again, something like
Sub RunProcess()
Dim dtLastRun as DateTime = DateTime.Now()
' Allow a nice tidy shutdown, via the OnStop Event
Do While Not bgServiceStopRequested
If DateTime.Now.Hour <> dtLastRun.Hour Then
dtLastRun = DateTime.Now()
DoRealWork()
End If
Threading.Thread.Sleep( 5000 )
Loop
End Sub
HTH,
Phill W.