Set System Time Action

Declaration

<AMSETSYSTEMTIME SERVER="text" SETTIME="datetime" PROXYTYPE="text [options]" PROXYSERVER="text" PROXYPORT="number" PROXYUSERNAME="text" PROXYPASSWORD="text">

See Also

Open Web Page

Description

Either synchronizes the system clock to an Internet time server or sets the clock manually to a specific date/time.

Practical Usage

Useful in setting the system clock to the correct value at a regular interval.

Parameters

General Tab

SNTP Server
Text, Optional - Default NONE
MARKUP: SERVER="ntp.nasa.gov"

Specifies a host name (e.g. server.domain.com) or IP address (e.g. 555.555.555.555) to an SNTP server to use to synchronize the system clock with.

Set Date Time
Text, Optional - Default seconds
MARKUP:
locale independent) SETTIME="%DateSerial(2002,05,15) + TimeSerial(15,37,41)%"
locale dependant) SETTIME="5/15/2002 3:37:41 PM"

Specifies a date/time combination that the clock should be set to. This can be written either as a plain text string in the shortdate/shorttime format of the system. If the task must run regardless of date/time settings on the system it is better to use DateSerial() and TimeSerial() functions to generate a properly formatted datetime at runtime.

Proxy Tab

Proxy Type
Text [options], Optional - Default (none)
MARKUP: PROXYTYPE="Socks5"

Specifies proxy protocol that should be used.  If you are unsure of the value to use in this parameter, contact your network administrator.

Available Options Are:

System Default (default, recommended) - The settings specified in the Task Administrator preferences are used.
None - Explicitly instructs the action not to use a proxy server regardless of the system default
Socks 4 - Instructs the action to go through a Socks 4 compliant server
Socks 4a - Instructs the action to go through a Socks 4a compliant server
Socks 5 - Instructs the action to go through a Socks 5 compliant server

Note:  To create the most portable tasks it is best to specify "system default" and specify proxy settings in the Preferences of the Task Administrator (Proxy Tab).  By proceeding this way, tasks created in one environment that may have a proxy server will be portable to others that do not - and vice-versa.

Proxy Port
Number, Optional - Default 1028
MARKUP: PROXYPORT="3000"

Specifies the port that should be used to connect to the proxy server. Most proxy servers operate on port 1028 (the default) however the proxy server can be customized to operate on other ports

Proxy Host
Text, Optional - Default (blank)
MARKUP: PROXYSERVER="proxy.host.com"

Specifies the hostname (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server.

User Name (Proxy)
Text, Optional - Default (none)
MARKUP: PROXYUSERNAME="username"

Specifies the username that should be used to authenticate when connecting through the proxy server. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Password (Proxy)
Text, Optional - Default (none)
MARKUP: PROXYPASSWORD="encrypted"

Specifies the password that should be used to authenticate when connecting through the proxy server. When the step is created using the Task Builder it is written to the task encrypted. This option is only valid when Socks 5 is specified in the Proxy type as it is the only version that supports authentication.

Notes

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 by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...

More on expressions...

More on the expression builder...

Example

<AMSETSYSTEMTIME >

<AMSETSYSTEMTIME SETTIME="%DateSerial(2002,07,24) + TimeSerial(15,37,41)%">

<AMSETSYSTEMTIME SERVER="tock.usno.navy.mil">