Suspend Hibernate Action Icon

Suspend/Hibernate

Declaration

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

See Also

Lock Workstation | Log Off | Restart | Shut Down | Suspend/Hibernate | Empty Recycle Bin | End Process | Change Printer | Print | Set Date and Time | Run | Block Input | Generate Password

Description

Suspends or hibernates the local machine with the possibility to wake up at a specified time. Note that 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 Properties

Property

Type

Req'd

Default

Markup

Description

Action

Text (options)

Yes

Suspend

ACTION="hibernate"

Specifies whether the machine should go into suspend mode or hibernation mode. The available options are:

  • Suspend: Specifies that the system should go into suspend mode. Suspend mode is a special session state that causes windows to consume less power, by powering down certain devices.

  • Hibernate: Specifies that the system should go into hibernation mode. Hibernation mode is a special session state that causes windows to write the contents of all system memory to the hard disk and the power is shut off. The session will be restored the next time the system powers on.

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:

  • Minutes: The number specified in the Wake Delay parameter is represented in minutes.

  • Hours: The number specified in the Wake Delay parameter is represented in hours.

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/Not

No

No

IGNOREWHENLATE="YES"

If set to YES, the step will be ignored if the time specified in the Wake Time parameter has already passed. This parameter is set to NO by default.

Message to display in the shut down dialog box

Text

No

(Empty)

MESSAGE="Please begin to panic now"

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 set to YES. The message will be displayed for the number of seconds, minutes or hours specified in the Shutdown after  parameter.

NOTE: Due to operating system limitations this parameter is not supported on Windows 95/98/ME systems.

Force the suspend/hibernate (do not send permission request to applications)

Yes/No

No

No

FORCE="YES"

If set to YES, specifies that the system should hibernate or suspend immediately without notifying and waiting for applications to return that they are ready to close.

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

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

 

Sample 1 - Suspend computer.  System will wake up after 1 hours.  

<AMSUSPEND WAKEDELAY="1" />

 

Sample 2 - Set computer in hibernate mode.  System will wake up at 11:00:00 AM.  Hibernate system immediately without requesting permission to running applications.  

<AMSUSPEND ACTION="hibernate" WAKETIME="110000" FORCE="YES" />