logic required in onstart method in c#.net
===

on using window service of c# i want to run the service based on my configuration tags,actually i will set the Three tags of values in app.config as here below mentioned

    <add key ="FIREHOST_TIME" value ="5" ></add>
    <add key ="SETDAYS" value ="3" ></add>
    <add key ="RUN_NOW" value ="1" ></add> <!-- 0=no, 1=yes-->


if suppose RUN_NOW value is 1

when service starts it has to do work now and for next instance it should to run based by SETDAYS tags


if suppose RUN_NOW value is 0

when service starts it should not do the work it should wait for SETDAYS to come,then next instance should to run for every setdays tag


here below i have pasted by code:

    
       protected override void OnStart(string[] args)
        {
         DateTime tenAM = DateTime.Today.AddHours(FIREHOST_TIME);
    
    
    
                if (DateTime.Now > tenAM)
                    tenAM = tenAM.AddDays(SETDAYS);
    
    
                // calculate milliseconds until the next 10:00 AM.  
                int timeToFirstExecution = (int)tenAM.Subtract(DateTime.Now).TotalMilliseconds;
    
                // calculate the number of milliseconds in 24 hours.   
                int timeBetweenCalls = (int)new TimeSpan(24, 0, 0).TotalMilliseconds;
    
                TimerCallback methodToExecute = kickstart;
    
                // start the timer.  The timer will execute "ProcessFile" when the number of seconds between now and   
                // the next 10:00 AM elapse.  After that, it will execute every 24 hours.   
                System.Threading.Timer timer = new System.Threading.Timer(methodToExecute, null, timeToFirstExecution, timeBetweenCalls);


             }


so now i have to use tag help RUN_NOW and implement the logic, kindly advice how to perfom

