public void ThreadProc() { int waitTime = 1000; // 1 second try { while (true) { JazMax.Core.Leads.Services.DataExtractor o = new Core.Leads.Services.DataExtractor(); o.DoWork(); Thread.Sleep(waitTime); } } catch (ThreadAbortException e) { Debug.WriteLine(e.Message); } }
static void Main(string[] args) { JazMax.Core.Leads.Services.DataExtractor o = new Core.Leads.Services.DataExtractor(); o.DoWork(); }