What, like this?
Private Sub tmrScheduler_Elapsed(ByVal sender As System.Object, ByVal e As
System.Timers.ElapsedEventArgs) Handles tmrScheduler.Elapsed
If gblnSomethingBadIsHappening Then
OnStop()
Else
tmrScheduler.Stop()
tmrScheduler.Enabled = False
SchedulerTimerRespond()
tmrScheduler.Enabled = True
tmrScheduler.Start()
End If
End Sub
??
--
welcome to the mooon !
"John Bailo" wrote:
m00nm0nkey wrote: I need to make my service fail so that I can utilise the recovery settings in
the service config screen.
The recovery settings should let me either restart the service, run a
program or restart the computer, however, my VB.Net services have never
failed!
Is there a way I can programatically make them fail?
Thanks.
Run the Stop() method.