Scheduled pause in deployments

We would like to pause deployment periodically.

Our situation is that during the night we do maintenance jobs that make it ill advised to do deploys. So, we would like to automatically block deploys during those periods of time.

Is this possible in Octopus?


Thanks for reaching out. You can set your Octopus instance into Maintenance Mode to prevent all deployments from taking place. There’s not a way to schedule this, but you could use the below Octoposh Cmdlet to do it from a script, and then rely on your build server or a scheduled task to get your server into/out of Maintenance mode at specific times of the day.

Let me know if that helps,

Good idea.

If I want to set up build server to do it, can I execute that command remotely?
Or is there a REST API command for setting the server into Maintenance Mode?


Hi Klas,

Yes that Cmdlet was made (by me) to be executed remotely, and in the background it uses the REST API. All you need to do is install the Octoposh module on the build agent that’s gonna be executing it.