Jul 072017
 July 7, 2017  Posted by at 8:00 am Dev Ops, PowerShell  Add comments

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.


The output is printed, and I can choose to modify the script and re-run it (in my case I checked that no jobs were running and then restarted the pool).

This is really handy!- and lets us manage things from one place without using additional tools.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



What is 6 + 12 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)