Suspend/Hibernate Action

Declaration

<AMSUSPEND ACTION="options" WAKEDELAY="text" WAKETIME="time" MEASURE="options" FORCE="yes/no">

See Also

Suspend/Hybernate Action-Setting Properties, Lock Workstation Action, Log Off Action, Shut Down Action

Description

Suspends or hibernates the local machine with the possibility to wake up at a specified time.  NOTE: This action is not supported on Windows NT.

Practical Usage

This action can be used to automate power saving routines on certain computers or servers that do not need to be on during non-use periods.

This action could be placed at the end of a task to reduce or eliminate power consumption when the machine is not doing anything, furthermore the action could set the machine to wake up immediately before the next task run time (if known).

Parameters

General Tab

Action

Options, Optional Default check
MARKUP: ACTION="uncheck"

Specifies whether the machine should go into suspend mode or hibernation mode.

The available options are:

Wake Delay

Text, Optional - default 0
MARKUP: WAKEDELAY="5"

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

Options, Optional Default minutes
MARKUP: MEASURE="seconds"

Specifies whether the machine should go into suspend mode or hibernation mode.

The available options are:

Wake Time

time, Optional Default ""
MARKUP: WAKETIME="120002"

Specifies that the machine should wake at a certain time rather than after a certain delay.

Force the suspend/hibernate

Yes/No, Optional - default NO
MARKUP: FORCE="YES"

Specifies that the system should hibernate or suspend immediately without notifying and waiting for applications to return that they are ready to close.

Notes

Custom Description

This action includes the Description tab for entering a custom step description.

More on setting custom step description

Standard Error Handling Options

This action also includes the standard Error Causes and On Error failure handling options/tabs.

More on Error Handling Options

Variables and Expressions

All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.

More on variables
More on expressions

More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

<AMSUSPEND ACTION="hibernate" WAKETIME="120002">