Pause Task Action Icon

Pause Task

Declaration

<AMPAUSE ACTION="text (options)" TIME="TimeSerial" DAY="text (options)" />

or

<AMPAUSE ACTION="text (options)" SCALAR="number" />

See Also

Pause Task | Wait for File | Wait for Pixel | Wait for Pointer | Wait for Process | Wait for Window | Stop Timer | Read Timer  | Start Timer

Description

Pauses task execution at the current step for a specified number of hours, minutes, seconds, milliseconds or until a specific day and/or time has been reached.

Practical Usage

Usually used to pause execution of a task until a process has completed. If the process completion time is variable, other wait actions such as Wait for Window, Wait for Pointer, or Wait for File should be considered as they would be more precise.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Wait For

Text

No

Enabled

ACTION="waitfor"

If enabled, instructs the system to wait for a specific amount of time.

Delay to wait for

Text

No

Seconds

SCALAR="30"

The amount of time to wait. This parameter is available only if the Wait for parameter is enabled. The available drop-down options are:

  • Milliseconds

  • Seconds (default)

  • Minutes

  • Hours

Wait Until

Text

No

Disabled

ACTION="waituntil"

If enabled, instructs the system to wait until the specified date/time.

Time

Text

No

(Empty)

TIME="%TimeSerial(17,00,00)%"

The time to wait until. This parameter is available only if the Wait Until parameter is enabled.

Day

Text

No

Any Day

DAY="sameday"

The day to wait until. This parameter is available only if the Wait Until parameter is enabled. The available drop-down options are:

  • Any Day (default)

  • Same day the action runs

  • Day after the action runs

  • Specific day of the week

  • Specific date

Specific Date

Date

No

(Empty)

DATE="%DateSerial(2010,07,15)%"

The specific date that the step will wait until. This parameter is available only if the Day parameter is set to Specific Date.

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.

 

Example 1 - Pause task until tomorrow at 12:00:00 PM.  

 

<AMPAUSE ACTION="waituntil" TIME="%TimeSerial(12,00,00)%" DAY="nextday" />

 

 

Example 2 - Pause task for 30 seconds.  

 

<AMPAUSE ACTION="waitfor" SCALAR="30" />

 

↑ Top of Page