How to remove old servers from hagnfire in Blue/Green deployment

Hello

We have blue-green stack deployment. We keep inactive stack up and running for 24hrs that results in old servers keep getting used in hangfire job processing. Is there any way we can remove old servers or stop getting added?
or

I’m mostly interested in any best practices for this sort of set up. does anyone have any practical advice for stopping jobs from running on old code in a blue-green deployment scenario?

I had a similar situation, I added a flag in your AppSettings.json add EnableCampaignHangfireJobGeneration= true/false
if(_configRoot[“EnableCampaignHangfireJobGeneration”].Equals(“false”,StringComparison.OrdinalIgnoreCase))
{
return; //do nothing
}

//schedule jobs