I'm working on a project that has the purpose to execute tasks in intervals.
The tasks and it's properties can be configured through the Configuration Website. The data is being stored in the Configuration Database. The Windows-Service loads all the data from the Configuration Database on startup and then executes the tasks correspondingly:
That means that I have to restart my service in order to apply new changes. There are several problems that come along with it:
1. Handling the restart manually or automatically
I could restart the service every time changes have been made, which could be a bit overkill. I could also give the user the "responsibility" to restart the service. My target group aren't some random clients, they're also Sysadmins so they know what to do. I'd still need to mention somehow that there are "unapplied" changes.
2. Knowing when to restart
There's no direct communication between my website and the service. Restarting whenever could mean that it'll stop the service while it's executing a task; obviously not good. I'd somehow need to queue the restart after all ongoing tasks have been finished but I don't know how to realize this in the first place.