Skip to main content

NightWatchman Enterprise

Alarm clocks and maintenance windows

NightWatchman supports alarm clocks (makes a computer ready for a user) and maintenance windows (makes a computer ready for unattended maintenance). These events are set using the NightWatchman Management Center Console (recommended) or from the command-line.

When configured using the command-line at the client, NightWatchman will set the desktop computer to wake from sleep.

When configured centrally using the NightWatchman Management Console and with an implementation of WakeUp, computers in an off-state will additionally be woken. If a laptop is connected to the LAN at this point, it is assumed to be connected to power and will also be woken.

All the times for alarm clocks and maintenance windows refer to the local time on the computer where the event is taking place. So, if you set an alarm clock for 09:00 and apply that to computers in the UK and in the US, those computers will wake up at 09:00 in their respective time zones.

Note

NightWatchman will not wake a laptop from sleep for alarm clocks or maintenance windows. If you are using Configuration Manager and have many site servers, these events should be set using dummy Configuration Manager advertisements for performance reasons. Client computers are brought out of a low-power state up to 5 minutes before an alarm clock or maintenance window event to ensure that they are available at the pre-determined time.

Alarm clocks

Alarm clock definitions consists of a day of the week and a time when it should operate. For example, you may want all machines in a development department to be available from 08:00 Monday to Friday, except Thursday where there is a team meeting and the machines should be available from 10:00.

Setting alarm clocks from the command-line

On the NightWatchman command-line, you set alarm clocks using alarmclock and acturnonmonitor. When using this method to define alarm clocks, you can only bring client computers out of a sleep state and not from a power-off state.

To bring clients out of a power-off state you must use the NightWatchman Console together with WakeUp. For example, to set a weekly alarm clock for the above profile for Windows:

nightwatchman 
-alarmclock="monitorstate=on|
mon(08:00)|tue(08:00)|wed(08:00)|thu(10:00)|fri(08:00)"

and on the Mac:

./nightwatchman -alarmclock mon=08:00, tue=08:00, wed=08:00, thu=10:00, fri=08:00

On Windows computers, if you want the display to turn on at the same time as the alarm clock, set acturnonmonitor as well:

nightwatchman -acturnonmonitor=on
Setting alarm clocks from the NightWatchman Console

Alarm clocks can also be defined using power policies. One advantage of using a power policy to set alarm clocks is that if WakeUp integration is enabled, you can bring a computer out of a power-off state as well, unlike the command-line restriction, where you can only bring a computer out of a sleep state.

Keeping a computer awake after an alarm clock

By default, an alarm clock call keeps a computer awake by preventing power schemes from operating for 60 minutes. This value is configurable at install time, see KEEPAWAKEAFTERWAKEUPMINS.

Maintenance windows

A maintenance window definition consists of a day of the week and a time when it should operate, the duration and the action to take at the end of this window. For example, you may want all machines in a network to be available at 02:00 every Wednesday to receive Windows updates.

Setting maintenance windows from the command-line

On the NightWatchman command-line, you set maintenance windows using maintenancewnd and mwturnonmonitor. When using this method of defining maintenance windows, you can only bring the client computer out of a sleep state and not from a power-off state.

To bring clients out of a power-off state you must use the NightWatchman Console combined with WakeUp. For example, to set a weekly 1-hour maintenance window at 02:00 on a Wednesday after which the computer goes into standby with the display remaining off at all times:

nightwatchman 
-maintenancewnd="monitorstate=off|
wed(02:00,60,1)" 

You can also configure the display to behave differently from maintenancewnd using mwturnonmonitor. For example, to turn the display on during maintenance windows:

nightwatchman 
-mwturnonmonitor=on
Setting maintenance windows from the NightWatchman Console

Maintenance windows can also be defined using power policies. One advantage of using a power policy to set maintenance windows is that if WakeUp integration is enabled, you can bring a computer out of a power-off state as well, unlike the command-line where you can only bring a computer out of a sleep state.