G
Guest
Hi,
I created a service to execute every 2 hours but it only executes once at
startup. This is part of the code
Protected Sub Test(ByVal obj As Object)
Dim sDate As String = Date.Today.ToShortDateString
If sDate = "4/25/2005" Then
sEvent = "Test after 10Sec"
oEventLog.WriteEntry(sEvent, EventLogEntryType.Error, 200)
Else
Exit Sub
End If
End Sub
At startup.............
Dim TimerDelegate As New Threading.TimerCallback(AddressOf Test)
Dim TimerItem As New System.Threading.Timer(TimerDelegate, 1, _
5000, 10000)
Any ideas?
I created a service to execute every 2 hours but it only executes once at
startup. This is part of the code
Protected Sub Test(ByVal obj As Object)
Dim sDate As String = Date.Today.ToShortDateString
If sDate = "4/25/2005" Then
sEvent = "Test after 10Sec"
oEventLog.WriteEntry(sEvent, EventLogEntryType.Error, 200)
Else
Exit Sub
End If
End Sub
At startup.............
Dim TimerDelegate As New Threading.TimerCallback(AddressOf Test)
Dim TimerItem As New System.Threading.Timer(TimerDelegate, 1, _
5000, 10000)
Any ideas?