I am currently working on a project to manage maintenance windows in a server database, etc. Basically, I have to be accurate down to the hour, but let them set, allow or deny, for every day of the week.
I had a few ideas on how to do this, but since I work alone, I do not want to do anything without any feedback.
To visualize this, it looks like the current βchartβ
| Sun | Mon | Tue | Wed | Thu | Fri | Sat | ------------------------------------------- 5AM |allow|allow|allow|deny |deny |allow|allow| ------------------------------------------- 6AM |allow|deny |deny |deny |deny |deny |allow| ------------------------------------------- 7AM |allow|deny |deny |deny |deny |deny |allow| ------------------------------------------- 8AM |allow|deny |deny |deny |deny |deny |allow| ------------------------------------------- 9AM |allow|deny |deny |deny |deny |deny |allow| ------------------------------------------- ... etc...
Is there a standard way to do this or a resource that can give me some ideas ...
- Make a format that can be easily saved and restored.
- Make it searchable in the database (for example, you don't need to deserialize it to find the time)
[Update]
It should be noted that on the day it would be possible, although unlikely, to establish "allow, prohibit, allow, refuse ... etc.". The span is not guaranteed to be the only one for the whole day.
This is also not the only schedule, there will be hundreds of devices, each of which has its own schedule, so it will get hairy ... lol ??
Rob asked if you need to track every week - it is not. This is a general schedule that will be applied throughout the year (regular scheduled maintenance).
database datetime data-structures timespan
Hugoware
source share