System and maintenance windows

How to use maintenance windows in Configuration Manager

Applies to: Configuration Manager (current branch)

Use maintenance windows to define when Configuration Manager can run impacting tasks on devices. Maintenance windows help make sure that client configuration changes occur during times that don’t affect productivity. With Software Center, users can see the device’s next maintenance window on the Installation status tab.

The following tasks support maintenance windows:

Application and package deployments

Software update deployments

Compliance settings deployment and evaluation

OS and custom task sequence deployments

Configure maintenance windows with an effective date, a start and end time, and a recurrence pattern. The maximum duration of a window has to be less than 24 hours. The console doesn’t allow a single maintenance window longer than 24 hours. For example, if you want to allow maintenance all day Saturday and Sunday, then create two 24-hour maintenance windows for each day.

By default, computer restarts caused by a deployment aren’t allowed outside of a maintenance window, but you can override the default. Maintenance windows affect only the time when the deployment runs. Deployments that you configure to download and run locally can download content outside of the window.

When a client is a member of a device collection that has a maintenance window, a deployment runs only if its maximum allowed run time doesn’t exceed the duration of the window. If the deployment fails to run, the client generates an alert. It then reruns the deployment during the next scheduled maintenance window that has available time.

A maintenance window is for a client. A service window is for a site server. For more information, see Service windows for site servers.

Multiple maintenance windows

When a client computer is a member of multiple device collections that have maintenance windows, these rules apply:

If the maintenance windows don’t overlap, the client treats them as two independent maintenance windows.

If the maintenance windows overlap, the client treats them as a single window for the entire time of both windows. For example, you create two maintenance windows on a collection. The first is effective from 6:00 to 7:00, and the second is effective from 6:30 to 7:30. Because they overlap by 30 minutes, the effective duration of the combined maintenance window is 90 minutes from 6:00 to 7:30.

When a user installs an application from Software Center, the client starts it immediately. It prioritizes the user’s intent over the administrator’s.

If an application deployment with a purpose of Required reaches its installation deadline during the non-business hours that a user configures in Software Center, the client installs the application. It prioritizes the administrator’s intent over the user’s.

By default, with multiple maintenance windows, the client only installs software updates during Software Update type windows. It ignores any All deployments maintenance windows, unless they’re the only type. You can configure this behavior with the following client setting in the Software updates group: Enable installation of software updates in «All deployments» maintenance window when «Software Update» maintenance window is available. For more information, see About client settings.

This setting also applies to maintenance windows that you configure to apply to Task sequences.

If the client only has an All deployments window available, it still installs software updates or task sequences in that window.

Configure maintenance windows

In the Configuration Manager console, go to the Assets and Compliance workspace.

Select the Device Collections node, and then select a collection.

You can’t create maintenance windows for the All Systems collection.

On the Home tab of the ribbon, in the Properties group, choose Properties.

Switch to the Maintenance Windows tab, and select the New icon.

Читайте также:  Удаляем баннеры windows заблокирован

Specify a Name to uniquely identify this maintenance window for the collection.

Configure the Time settings:

Effective date: The date when the maintenance windows starts. The default is the current date.

Start and End: The start and end times of the maintenance window. It calculates the Duration for the window. The minimum duration is five minutes, and the maximum is 24 hours. The default duration is three hours, from 01:00 to 04:00.

Coordinated Universal Time (UTC): Enable this option for the client to interpret the start and end times in the UTC time zone. For regionally or globally distributed devices in the same collection, this option sets the maintenance window to occur simultaneously on all devices in the collection. Disable this option for the client to use the device’s local time zone. This option is disabled by default.

Configure the recurrence pattern. The default is once per week on the current day of the week.

Apply this schedule to: By default the window applies to All deployments. You can select either Software updates or Task sequences to further control what deployments run during this window.

If you configure multiple maintenance windows of different types on the same collection, make sure you understand the client behaviors. For more information, see Multiple maintenance windows.

Select OK to save and close the window.

The Maintenance Windows tab of the collection properties displays all configured windows.

Use PowerShell

You can use PowerShell to configure maintenance windows. For more information, see the following articles:

Automatic maintenance

Maintenance activity refers to an application or process that helps maintain the health and performance of a Windows PC. Maintenance includes keeping the Windows operating system (OS) and applications up-to-date, checking security, and running scans for malware. Windows Automatic Management (WAM) is a set of enhancements to the Task Scheduler API that you can use to link your applications into the Windows maintenance schedule. Specifically, WAM allows you to add activities that require regular scheduling, but that don’t have exact time requirements. Instead, WAM relies on the operating system to choose the appropriate time to activate the task throughout the day. The system chooses those times based on minimal impact to the user, PC performance, and energy efficiency.

How scheduled maintenance works

Task Scheduler maintenance tasks are opportunistic tasks that run when the machine is idle and on AC power. One of the major goals of maintenance tasks is to minimize impact to the PC by scheduling maintenance only when the PC is plugged in to AC power and idle (that is, when you’re not using, or have stepped away from, the machine). The idea of maintenance today is for the machine to do work with the least disruption to the user. Hence the old-style maintenance hour (we talk more about this in the Automatic maintenance—daily wakeup section later in this topic) has been improved in order to take advantage of these idle periods. While the maintenance hour can still be leveraged, running opportunistic maintenance is better for system health.

Your task may be starved if a machine doesn’t spend much time both idle and on AC power. Make sure that your scenario will still provide value to the user, even if it is delayed. If the user is actively using the machine, then the system defers maintenance until a later time. The system also suspends any executing maintenance task if the user returns to using the PC.

The system restarts a suspended maintenance task during the next idle period; however, the system won’t suspend any task marked as critical. Instead, the system allows a critical task to complete, regardless of user action.

Due to the nature of scheduling, some scheduled tasks may not finish: perhaps there are too many scheduled events to fit into the 1-hour maintenance window, or maybe the computer was simply not turned on. In such cases, you can define a task with a deadline. A deadline is defined as a recurring timeframe in which the system must successfully perform the task at least once.

Читайте также:  Редактирование загрузчик windows 10

If a task misses a deadline, then the maintenance scheduler will continue to attempt to execute the task during the maintenance window. Further, the scheduler will not limit itself to the regular 1-hour time limit. Instead, the scheduler extends the duration of the maintenance window in order to complete the delayed task.

Once the system completes the task (even with a failure error code), the attempt is considered successful. After a successful attempt, the scheduler resets to the regular maintenance schedule, and will attempt the task during the next period.

Automatic maintenance—daily wakeup

On Windows 7, a maintenance task runs exclusively during maintenance hour, defaulting to 3 AM, and configurable via Group Policy. The machine would wake up from standby, run maintenance tasks, and go back to sleep. This daily session was limited to a maximum duration of 1 hour per attempt. This would allow the system to perform maintenance daily, starting at 3 AM by default. Note that the user may re-schedule the time that the maintenance is triggered by configuring these settings.

With the advent of laptops, and the heavy focus on battery life, machines are no longer configured to allow S3 wakeup in most circumstances, and generally Doze-To-S4 (hibernate) as soon as possible, to save battery. In response to these changes, Task Scheduler (> Win7) runs maintenance tasks whenever they are due, and the machine is idle and on AC power.

This setting can be configured in Control Panel.

Open Control Panel > System and Security > Security and Maintenance > Automatic Maintenance.

So based on how your machines and your tasks are configured, the daily wakeup behavior may not occur today as expected because of this new configuration. You can first determine whether your machine is S3 capable or CS (Connected Standby) capable. This can be done by opening an elevated power shell prompt, and running the following command.

Maintenance hour, if the machine is configured correctly, still works, but if it doesn’t,

  • Check your BIOS settings for Wake settings.
  • Check whether Allow Wake Timer is enabled in Power Options. Go to Control Panel >Hardware and Sound >Power Options >Edit Plan Settings >Change advanced power settings > click Sleep >Allow Wake Timer.
  • Check whether your scheduled task is configured with following.
    • MaintenanceSettings: Task should be configured with Period, Deadline.
    • Enabled: Task should be enabled.
    • WakeToRun: Task should be allowed to wake the machine.
  • For scheduling wakes from CS, the machine should be AOAC capable.
  • For scheduling wakes in S3 machines,
    • Check whether the machine went into S3 on AC Power.
    • The system should have Wake Enabled in Group Policy for Maintenance.

Connected Standby is the system state that an AOAC-compliant system can enter.

See differences between Modern Standby and S3 in the topic Modern Standby vs S3.

Defining an Automatic Maintenance Task

You can convert any Task Scheduler task to a maintenance task. To do so, you must confirm that your application can be suspended. Then, you must extend the task definition with the new MaintenanceSettings and AllowStartOnDemand elements.

The main concern with creating a maintenance task is ensuring that the system can suspend and restart the task. The system will likely suspend a maintenance task multiple times; therefore, you need to ensure that your application is able to save its own state, and then resume at an arbitrary time. This ensures that the system does not perform the same part of your task repeatedly.

Once you have ensured that your application can be suspended and resumed gracefully, you can use the MaintenanceSettings and AllowStartOnDemand elements to define the schedule. MaintenanceSettings is defined according to the period, deadline, and exclusivity.

  • The period is mandatory, and defines how often the task should occur. Usually, this is defined in terms of a multi-day cycle, such as “once every 5 days”. A period must be at least one day, meaning that you can’t schedule a task to occur multiple times in a day.
  • The deadline is optional, and defines how long the scheduler can fail to complete the task before notifying the user or performing emergency maintenance. The deadline must be longer than the period, meaning that the system must have the opportunity to attempt the task at least once before notifying the user.
  • In addition, a maintenance task can optionally be defined as exclusive. An exclusive task runs separate from other maintenance tasks. Usually, an exclusive task is one that uses a great deal of resources, such as a large amount of CPU time, or exclusive access to a database. The system completes all non-exclusive maintenance tasks before starting an exclusive task. Therefore, you should declare a task as exclusive only when necessary.
Читайте также:  Как сканировать windows 10 x64

In contrast, AllowStartOnDemand merely indicates that the system or the user can start the task at any time. This allows the system to start the task during regular maintenance. Otherwise, you would have to set a unique trigger for the task.

Как отключить Автоматическое обслуживание (Automatic Maintenance) в Windows 10

В данной статье показаны действия, с помощью которых можно отключить автоматическое обслуживание (Automatic Maintenance) в операционной системе Windows 10.

Операционная система Windows 10 автоматически запускает плановое обслуживание по ежедневному расписанию, в то время когда вы оставляете систему неактивной. Эта функция называется «Автоматическое обслуживание» и выполняет она различные задачи, такие как проверка наличия обновлений для Windows и другого программного обеспечения, сканирование на предмет наличия вирусов, системная диагностика, оптимизация дисков и многое другое.

Эти задачи будут выполняться ежедневно, если вы не работаете на компьютере в указанное в расписании время. Если в запланированное время ваш компьютер не бездействует или обслуживание отстает от расписания, то автоматическое обслуживание будет выполнено в следующий период бездействия компьютера.

«Автоматическое обслуживание» это полезная функция, которая поддерживает безопасность и производительность операционной системы в актуальном состоянии. Большинству пользователей не следует ее отключать, но в некоторых случаях может возникнуть необходимость в её отключении.

В графическом интерфейсе Windows 10 нет инструментов для отключения автоматического обслуживания, но сделать это можно с помощью редактора системного реестра.

Прежде чем вносить какие-либо изменения в реестр, настоятельно рекомендуется создать точку восстановления системы или экспортировать тот раздел реестра, непосредственно в котором будут производиться изменения.

Откройте редактор реестра, для этого нажмите сочетание клавиш + R, в открывшемся окне Выполнить введите команду regedit и нажмите клавишу Enter↵.

В открывшемся окне редактора реестра перейдите по следующему пути:

В правой части окна, нажмите правой кнопкой мыши в пустой области и в появившемся контекстном меню выберите Создать > Параметр DWORD (32 бита).

Присвойте созданному параметру имя MaintenanceDisabled .

Далее дважды щелкните левой кнопкой мыши по созданному нами параметру, и в качестве его значения установите 1, нажмите кнопку OK и закройте редактор реестра.

Чтобы изменения вступили в силу, перезагрузите компьютер. Теперь автоматическое обслуживание будет отключено.

Для того чтобы включить автоматическое обслуживание, просто удалите параметр MaintenanceDisabled или измените его значение на 0 и перезагрузите компьютер.

Также для того чтобы отключить автоматическое обслуживание, можно создать и применить файл реестра следующего содержания:

Windows Registry Editor Version 5.00

После применения файла реестра (reg-файла), чтобы изменения вступили в силу перезагрузите компьютер.

Чтобы включить автоматическое обслуживание, создайте и примените файл реестра следующего содержания:

Windows Registry Editor Version 5.00

После применения файла реестра (reg-файла), чтобы изменения вступили в силу перезагрузите компьютер.

Ниже можно скачать zip-архивы с готовыми файлами реестра для отключения/включения автоматического обслуживания:

После применения файлов реестра (reg-файлов), чтобы изменения вступили в силу перезагрузите компьютер.

Оцените статью