Computer
- Suspend
Declaration
<AMCOMPUTER ACTIVITY="suspend" WAKEDELAY="number" MEASURE="text (options)" WAKETIME="number" IGNOREWHENLATE="YES/NO" FORCE="YES/NO" />
Overview
Suspends the computer with the possibility to wake up at a specified time.
Practical usage
Used to automate power saving routines on certain computers or servers that do not need to be on during non-peak periods. It can be placed at the end of a task to reduce or eliminate power consumption when the machine is not doing anything. This can also set the machine to wake up immediately before the next task runtime (if known).
Parameters
General
| Property | Type | Required | Default | Markup | Description |
|---|---|---|---|---|---|
|
Wake Delay |
Number | No | 0 | WAKEDELAY="5" | If enabled, specifies the amount of time that elapses after the system goes into suspend or hibernate mode, before the system automatically resumes normal operation. |
| Wake Measure | Text (options) | No | Minutes | MEASURE="hours"" | Specifies
the wake measure. The available options are:
|
| Wake Time | Number | No | (current time) | WAKETIME="120002" | Denotes that the machine wakes at the time specified rather than after a certain delay. |
| Ignore step if specified time has passed | Yes/No | No | No | IGNOREWHENLATE="YES" | If selected, the step is ignored if the time specified in the Wake Time parameter has already passed. This parameter is disabled by default. |
| Message to display in the shut down dialog | Text | No | (Empty) | MESSAGE="The computer is now being suspended." | A user-defined message that Windows displays on the restart notification dialog. This parameter is active only if the Prompt user to log off parameter is selected. The message is displayed for the number of seconds, minutes, or hours specified in the Shutdown after parameter. |
| Force the suspend/hibernate (do not send permission request to applications) | Yes/No | No | No | FORCE="YES" | If selected, specifies that the system hibernates or suspends immediately without notifying and waiting for applications to return that they are ready to close. |
Example
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
The following sample task suspends the local computer and sets it to wake in 1 hour:
<AMCOMPUTER ACTIVITY="suspend" WAKEDELAY="1" MEASURE="hours" />