This is a sample of what I am doing
On service startup I have
Dim TimerDelegate As New Threading.TimerCallback(AddressOf ExecuteTask)
Dim TimerItem As New System.Threading.Timer(TimerDelegate, 1, _
10000, 3600000)
Protected Sub ExecuteTask(ByVal obj As Object)
If (GetFileByFtp()) = True Then
ProcessFile(sFileName)
Kill("C:\" & sFileName)
Else
Exit Sub
End If
End Sub
Thats basically what I have.
"bmsgharr" wrote:
Are you sure you are restarting the timer once you have finsihed what you
need to do in the Timer1_Tick event? Have you assigned a method to this event?
HTH
Graham Harris
"Chris" wrote:
Hi,
I have created a service that runs fine when set to check every fre secs,
however, I set it to run every 2 hours but when I start the service it runs
only once.
This is how I am setting the 2 hours
Dim TimerItem As New System.Threading.Timer(TimerDelegate, 1, _
10000, 3600000)
Any ideas?
Thanks