static void Main(string[] args) { ACEmailer aceEmailer; try { aceEmailer = new ACEmailer(); aceEmailer.ProcessPreCampaigns(); aceEmailer.ProcessPostCampaigns(); } catch (Exception ex) { throw ex; } }
public void OnTimer(object sender, System.Timers.ElapsedEventArgs args) { eventLog.WriteEntry("Calling ACEEmailer Process|" + DateTime.Now.ToShortTimeString(), EventLogEntryType.Information); ACEmailer aceEmailer; try{ aceEmailer = new ACEmailer(); aceEmailer.ProcessPreCampaigns(); aceEmailer.ProcessPostCampaigns(); } catch(Exception ex){ eventLog.WriteEntry("Error in ACEEmailer Process|" + DateTime.Now.ToShortTimeString() + "|" + ex.Message , EventLogEntryType.Error); } eventLog.WriteEntry("ACEEmailer Complete|" + DateTime.Now.ToShortTimeString(), EventLogEntryType.Information); }