protected override void OnStart(string[] args) { try { objTimer.Elapsed += new ElapsedEventHandler(OnElapsedTime); //step 2: set interval to 1 week (1 minute= 60,000 milliseconds) objTimer.Interval = 60000 * 60 * 24 * 7; //step 3: enabling the timer objTimer.Enabled = true; } catch (Exception ex) { WriteLog(ex); //SROEventLog.WriteEntry("Exception occured in OnStart()" + ex); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)