We have a peculiar situation with our Hangfire service, a service that kicks of jobs as separate processes using different queues for different tenants. When we add a new tenant we currently have to restart the application pool. I know. Not ideal. But it is what it is, until we get that sorted. Additionally, we have quite a few servers, representing different environments (EDGE, QA, AT and PROD). Remoting in to each server to check if there are current jobs running, and if not restarting the pool, is not fun. However, lately I’ve been using Octopus Deploy for this.
If you go to Tasks in the menu you will see a Script Control link on the right-hand side. This will take you to a script console where you can write and run one-off on-the-go scripts remotely.
Here is a simple example where I get a list of the pools on our PROD4 machine.
This is really handy!- and lets us manage things from one place without using additional tools.