You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be useful to support the ability to schedule periods during which no run profiles should be allowed to start. E.g. to allow server auto-patching to take place, which may involve the machine rebooting.
This could re-use the existing functionality to "stop all controllers" and "start all controllers" at the specified times.
For regular windows, some of the functionality from the Triggers GUI could maybe be reused to set up the intervals.
The text was updated successfully, but these errors were encountered:
What about doing this from PowerShell? Stop the autosync service, use the miis powershell to wait for all MAs to finish (wait-managementagent) then perform your mainteance tasks and do things like reboot the server?
Alternatively, a scheduled task that stops the autosync service at a certain time, and restarts it later?
I'm not against building something into AutoSync, but would just want to make sure the complexity of doing this adds value that couldn't be achieved otherwise.
I have made use of the Execution Controller Script feature to do a last minute check to see if the current time is in a patching window, and bail out of running the MA if so. Not sure how bullet proof it is, but it will hopefully do the trick.
# This function is called by the MA executor before a run profile is executed. Return $false to prevent the run profile from being executed# Returning $true or nothing will allow the run profile to executefunctionShouldExecute
{
param([string]$runProfileName)
# Patching Day$patchingDay="Tuesday"# Patching window start time$patchingStartTime="12:30"# Patching window end time$patchingEndTime="14:30"# Current date/time$now=Get-Date#if it is patching day, and it is patching time, don't run this MAif ($patchingDay-eq$now.DayOfWeek)
{
if ($now-ge (Get-Date$patchingStartTime) -and$now-lt (Get-Date$patchingEndTime))
{
# Current time is withing patching window, do not start this run profilereturn$false
}
}
return$true;
}
Enhancement request:
It could be useful to support the ability to schedule periods during which no run profiles should be allowed to start. E.g. to allow server auto-patching to take place, which may involve the machine rebooting.
This could re-use the existing functionality to "stop all controllers" and "start all controllers" at the specified times.
For regular windows, some of the functionality from the Triggers GUI could maybe be reused to set up the intervals.
The text was updated successfully, but these errors were encountered: