Computer - Suspend
Declaration
<AMCOMPUTER ACTIVITY="suspend" WAKEDELAY="number" MEASURE="text (options)" WAKETIME="number" IGNOREWHENLATE="YES/NO" FORCE="YES/NO" />
Description
Suspends the computer with the possibility to wake up at a specified time.
Practical usage
This activity can be used to automate power saving routines on certain computers or servers that do not need to be on during non-peek periods. It could be placed at the end of a task to reduce or eliminate power consumption when the machine is not doing anything. Furthermore, this activity could 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 should elapse after the system goes into suspend or hibernate, before the system should automatically resume 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 should wake 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 will be 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 should display on the restart notification dialog. This parameter is active only if the Prompt user to log off parameter is selected. The message will be 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 should hibernate or suspend 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
This sample task suspends the local computer and sets it to wake in 1 hour.
<AMCOMPUTER ACTIVITY="suspend" WAKEDELAY="1" MEASURE="hours" />