Working with Dial-up (RAS) and Your Internet Connection



RASUser: "dialup-login"

Sets user name (login) for a dial-up connection.


RASPassword: "dialup-password"

Sets password for a dial-up connection.


RASSecPassword: "dialup-secure-password"

Sets secure (encrypted) password for a dial-up connection. Here you can find a detailed description of what secure password is and how to get one .


RASPhone: "phone"

Specifies a phone number to dial. This parameter optional. If it is omitted, then nnCron will use the default phone for the dial-up connection specified in command DIAL:.

Example:

RASPhone: "1234567"

To force pulse dialing, use prefix P before the phone number.

Example:

RASPhone: "P1234567" 

RASDomain: "domain"

Specifies a domain name for a dial-up connection. This parameter is optional. If it is omitted, nnCron will use the default domain for the dial-up connection specified in command DIAL:.


DIAL: "ras-entry" <number of attempts> <pause between attempts in seconds>

Initiates the dial-up process using the specified dial-up connection. Second and third arguments of word DIAL: specify, respectively, the number of attempts and the pause (in seconds) between attempts.

Dial error code is recorded into variable RASError.

Example:

#( test_dial
\ Dial-up a connection at 10:00 am on each week day
\ unless the computer is already online,
\ using remote connection 'MyConnection'.
Time: 0 10 * * 1-5 *
Action:
    \ checking if an Internet connection already exists
    ONLINE: "MyConnection" 0=
    IF
        RASUser: "login"
        RASPassword: "password"
        \ five dialing attempts with 30 seconds intervals between attempts
        DIAL: "MyConnection" 5 30
    THEN
)#

HANGUP: "ras-entry"

Breaks up a specified dial-up connection.

Example:

#( test_dial1
\ Dialing up a connection each hour  on every week day
\ unless the computer is already online,
\ using remote connection 'MyConnection'.
\ After connection is established, receiving the mail, 
\ and disconnecting. Time: 0 * * * 1-5 * Action: \ checking if an Internet connection already exists ONLINE: "MyConnection" 0= IF RASUser: "login" RASPassword: "password" \ five dialing attempts with 30 seconds intervals between attempts DIAL: "MyConnection" 5 30 THEN ONLINE: "MyConnection"
IF START-APPW: getmail.bat
HANGUP: "MyConnection"
ELSE MSG: "Can't establish connection." THEN )#

HANGUP

Breaks up any dial-up connection.


HOST-EXIST: "hostname_or_ip_address"
NHOST-EXIST: "hostname_or_ip_address" <num>

These words return TRUE (-1) if a specified server is accessible (can be pinged).
HOST-EXIST: pings the server 3 times, and in NHOST-EXIST:, the number of ping-attempts is specified by the user.
By default, the ping-timeout is set to 3000 ms. You can set your own ping-timeout by modifying the VALUE-variable PING-TIMEOUT.

Example:

#( test_host_exist
\ Checking the accessibility of http://www.nncron.ru every midnight.
\ Starting 'my_app.exe' if the server can be pinged.
\ Setting ping-timeout to 5000 ms.
5000 TO PING-TIMEOUT
Time: 0 0
Rule: HOST-EXIST: "www.nncron.ru"
Action:
    START-APP: my_app.exe
)#

ONLINE?

Returns TRUE (-1) if any remote connection (dial up or VPN) is currently active


ONLINE: "connection"

Returns TRUE (-1) if a specified remote connection is active. As an argument, one should use the name of an actually existing connection as displayed in Dial-Up Networking (Network and Dial-up Connections) window.


CALL_DIAL
CALL_HANGUP

Special words for users of EServ2. They are used to start dial-up or hang up while using EServ2.


See also: