public void OnStart() { var interval = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings["updateinterval_minutes"]); _Domain = System.Configuration.ConfigurationManager.AppSettings["domain"]; _RecordID = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings["recordid"]); _DomainToken = System.Configuration.ConfigurationManager.AppSettings["domain_token"]; _DNSimple = new DNSimpleClient(_Domain, _DomainToken); _JSONIP = new JSONIPClient(); _Timer = new Timer(OnTick); var intervalMs = interval * 1000 * 60; _Timer.Change(1, intervalMs); }