0

I have a program that loops through and XML file and performs various functions and logs its activity. I now need to add to my XML file parameters where I can specify the day of week and time that the task should be skipped... I.E., during our scheduled maintenance windows.

Basically, I still want the task to run, I just don't want it to send out an e-mail alert if something fails during the maintenance window.

Since we sometimes have more than one maintenance window, but only one time during a 24-hour period, I thought of defining my parameters like this:

<DayOfWeek>Sat, Wed</DayOfWeek>
<TimeRange>00:00-06:00</TimeRange>

What would be the best logic to handle this? Our maintenance windows should run between the same time-range no matter what day of week it is.

1
  • Sharing your research helps everyone. Tell us what you found and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer:) Good Luck! Mar 16, 2013 at 0:40

1 Answer 1

0

To make it simple, put in the app.config of your service 2 key, for SkipTaskFrom and SkipTaskTo, with the date format you prefer (http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx) and then parse it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.