Sunday, March 8, 2015

make a Windows Service run nightly at a very specific time?

I told myself that there has to be an easier way to make a Windows Service periodically act than the solution here and I went Googling for it today where I found this which lead me to hope I could just put this in the App.config inside the configuration tag to run the contents of Service1's OnStart method once a minute...

<appSettings>
   <add key="Mode" value="Interval"/>
   <add key="IntervalMinutes" value="1"/>
</appSettings>

 
 

...but it didn't work. The same thing I found suggests the following as the way to make the service wake up at a particular time of day and then run for minute though I have not tried it.

<appSettings>
   <add key="Mode" value="Daily"/>
   <add key="IntervalMinutes" value="1"/>
   <add key="ScheduledTime" value="18:41"/>
</appSettings>

No comments:

Post a Comment