//void worker_DoWork(object sender, DoWorkEventArgs e) //{ // // Do the thing that needs doing every few minutes... // // (Omitted for simplicity is sentinel logic to prevent re-entering // // DoWork() if the previous "tick" has for some reason not completed.) //} public void Process() { try { var emailService = new EmailServices(); var credentials = emailService.GetCredentials(); emailService.ReadPop3Emails(credentials); emailService.ExecuteScheduledJob("Processrawdata"); emailService.ExecuteScheduledJob("LoadAgentQueue", 1); emailService.SendAutoResponseMail(); } catch (Exception ex) { wslog.WriteLog("ERR", ex.Message.ToString()); } }