Red Gate forums :: View topic - Pause Deployment
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation

Deployment Manager PowerShell Scripts forum

Pause Deployment

Search in Deployment Manager PowerShell Scripts forum
Post new topic   Reply to topic
Jump to:  
Author Message
PeterG



Joined: 20 Aug 2013
Posts: 4

PostPosted: Wed Aug 21, 2013 5:14 pm    Post subject: Pause Deployment Reply with quote

Here's a simple script for pausing a deployment using Powershell:

Code:

# Input:
# pauseLength: 10

# Pause the deployment for the given length in seconds

if ($null -eq $pauseLength) {
   throw "pauseLength must be set"
}


Write-Host "Sleeping for $pauseLength seconds"
Start-Sleep -Seconds $pauseLength
# For shorter periods use the -Milliseconds flag
#Start-Sleep -Milliseconds $pauseLength
Write-Host "Continuing"

_________________
Peter Gerrard
Intern - Deployment Manager
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group