public bool isComplete = true;
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { if (isComplete == true) { try { isComplete = false; eventLog1.WriteEntry("Service Initial Started at " + DateTime.Now.ToString() + Environment.NewLine); NexGenServiceRun(); eventLog1.WriteEntry("Service Final Completed at " + DateTime.Now.ToString() + Environment.NewLine); isComplete = true; } catch { isComplete = true; } } else { eventLog1.WriteEntry("Service not started, Previous service is not completed " + Environment.NewLine ); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)