RMS II
Reference A: Script File Format

(rev. 10-May-04)


This page describes the format of the script file used with RMS II.


Introduction

The script file specifies what actions the RMS Server should take and when. The possible actions are:

Script files can be generated automatically by the RMS Scheduler application, or manually using a text editor.

Script File Name

The script file must be of type 'TEXT', must be named "RMS Script SSSS ...", and must reside in the same folder as the RMS Server application. When you drag a new script file to an RMS Server using the RMS Client application, the file is automatically placed in the same folder as the server for you.

"RMS Script SSSS ..."

In the file name "RMS Script SSSS ..." the "SSSS" is the Site Code of the RMS Server which will execute the script. The "SSSS" in the file name must match the Site Code entered in the RMS ServerConfig document, otherwise the RMS Server will ignore the script. The "..." in the file name can be any other text desired. For example, it could be the date or some other version information.

When sending a new script to the RMS Server via FTP, the file name must be "RMS Script SSSS.hqx". When sending a new script to the RMS Server via E-mail, the file name must be "RMS Script SSSS".

Script File Format

In the descriptions below,

<CR> means the Carriage Return character
<T>  means the Tab character

The format of a script file is as follows:

VOA RMS Script<CR>
<script line 1>
     .
     .
     .
<script line N>
   

The first line in the file must be "VOA RMS Script". Any number of script lines may follow. A script line can be either a Comment, or an Event. Comment lines are marked with '*' as the first character in the line. Event lines must appear in chronological order by time-of-day.

A script line is formatted in one of the following ways, depending on whether the line is a Comment, or describes a Sound, Band Scan, FTP, or Mail event.

Comment:

*<any text can follow><CR>

Sound Event:

<daysOfWeek><T><time><T>S<T><bcaster><T><lang><T><freq><T><mode><T><relay><T><secs><T><compr><CR>
<daysOfWeek>  SMTWTFS; use the day-of-week letter to schedule the event for that day, use period to skip that day
<time>        HH:MM:SS 24-hour clock (UTC) when the event should occur
S             denotes a Sound event
<bcaster>     broadcaster (4 characters, left justified, blank filled)
<lang>        language (4 characters, left justified, blank filled)
<freq>        frequency 1 to 5 digits (kHz), or 1 to 4 digits with a "." (MHz)
<mode>        AM, FM, CW, LSB, USB, or RTTY
<relay>       relay station (4 characters, left justified, blank filled)
<secs>        number of seconds to record
<compr>       compression: M6 = MACE1:6, RA14 = RealAudio 14.4, RA28 = RealAudio 28.8, MP4 = MP4(AAC)
   

Scan Event:

<daysOfWeek><T><time><T>B<T><passes><T><startFreq><T><stopFreq><T><mode><T><stepFreq><T><dwellTime><CR>
<daysOfWeek>  SMTWTFS; use the day-of-week letter to schedule the event for that day, use period to skip that day
<time>        HH:MM:SS 24-hour clock (UTC) when the event should occur
B             denotes a Band Scan event
<passes>      number of times to scan the band
<startFreq>   start frequency 1 to 5 digits (kHz)
<stopFreq>    stop frequency 1 to 5 digits (kHz)
<mode>        AM, FM, CW, LSB, USB, or RTTY
<stepFreq>    step frequency 1 to 5 digits (kHz)
<dwellTime>   number of mSecs to wait for AGC to settle before sampling
   

FTP Event:

<daysOfWeek><T><time><T>F<T><doSetTime><T><doGetScript><T><doScans><T><doSounds><T><langFilter1><T><langFilter2><T><langFilter3><T><doLog><T><mins><T><URL><CR>
<daysOfWeek>  SMTWTFS; use the day-of-week letter to schedule the event for that day, use period to skip that day
<time>        HH:MM:SS 24-hour clock (UTC) when the event should occur
F             denotes an FTP event
<doSetTime>   SETTIME or NOSETTIME to set the time via the internet (using Vremya) or not
<doGetScript> GETSCRIPT or NOGETSCRIPT to look for and retrieve any new RMS Script file or not
<doScans>     SCANS, SCANSWITHSTUFF, or NOSCANS to send Scan files, Stuff and then send Scan files, or don't send Scan files
<doSounds>    SOUNDS or NOSOUNDS to send Sound files or not
<langFilter1> language filter1 (4 characters, left justified, blank filled); can also be nothing
<langFilter2> language filter2 (4 characters, left justified, blank filled); can also be nothing
<langFilter3> language filter3 (4 characters, left justified, blank filled); can also be nothing
<doLog>       LOG or NOLOG to send Log file or not
<mins>        number of minutes to spend doing FTP transfers
<URL>         URL of the ftp site to send to; e.g. ftp://user:password@voa.his.com//pub/voa/private/rms
   

Mail Event:

<daysOfWeek><T><time><T>M<T><doSetTime><T><doGetScript><T><doScans><T><doSounds><T><langFilter1><T><langFilter2><T><langFilter3><T><doLog><T><mins><T><doSendScript><T><emailSubj><T><emailAddr1><T><emailAddr2><T>...<emailAddrN>[<T>WEBMONITOR<T><email1><T><email2><T><email3><T><websiteName1><T><url1><T><website config. parameters1><T>...<websiteNameM><T><urlM><T><website config. parametersM>]<CR>
<daysOfWeek>   SMTWTFS; use the day-of-week letter to schedule the event for that day, use period to skip that day
<time>         HH:MM:SS 24-hour clock (UTC) when the event should occur
M              denotes a Mail event
<doSetTime>    SETTIME or NOSETTIME to set the time via the internet (using Vremya) or not
<doGetScript>  GETSCRIPT or NOGETSCRIPT to look for and receive any new RMS Script file or not
<doScans>      SCANS, SCANSWITHSTUFF, or NOSCANS to send Scan files, Stuff and then send Scan files, or don't send Scan files
<doSounds>     SOUNDS or NOSOUNDS to send Sound files or not
<langFilter1>  language filter1 (4 characters, left justified, blank filled); can also be nothing
<langFilter2>  language filter2 (4 characters, left justified, blank filled); can also be nothing
<langFilter3>  language filter3 (4 characters, left justified, blank filled); can also be nothing
<doLog>        LOG or NOLOG to send Log file or not
<mins>         the number of minutes to spend doing mail transfers
<doSendScript> SENDSCRIPT or NOSENDSCRIPT to send the current Server RMS Script File or not
<emailSubj>    text of the subject line in the e-mail message; e.g. Vienna sound files
<emailAddr1>   1st e-mail address to send the files to; e.g. voa@his.com
<emailAddr2>   2nd e-mail address to send the files to
...
<emailAddrN>   Nth e-mail address to send the files to (N must be between 1 - 20)
WEBMONITOR     denotes that web monitoring settings follow
<email1>       1st e-mail address to send the web monitoring logs to
<email2>       2nd e-mail address to send the web monitoring logs to (may be empty)
<email3>       3rd e-mail address to send the web monitoring logs to (may be empty)
   
<website config. parameters1> has following format (note: commas separate each option and no spaces allowed):
<timeout1>,             1st web site to monitor: timeout (seconds)
<Redirect option1>,     1st web site to monitor: REDIRECT or NOREDIRECT to either allow or disallow following HTML redirection requests
<Trace route option1>,  1st web site to monitor: FORCETRACE or NOFORCETRACE to always perform a trace route or only when necessary
<Num bytes to get1>,    1st web site to monitor: specifies ALL or number of HTML page bytes to retrieve. If ALL, entire page is retrieved.
<Get/Post option1>      1st web site to monitor: GET or POST to perform an HTTP GET request or a POST request
...
<website config. parametersM> has following format (note: commas separate each option and no spaces allowed):
<timeoutM>,             Mth web site to monitor: timeout (seconds)
<Redirect optionM>,     Mth web site to monitor: REDIRECT or NOREDIRECT to either allow or disallow following HTML redirection requests
<Trace route optionM>,  Mth web site to monitor: FORCETRACE or NOFORCETRACE to always perform a trace route or only when necessary
<Num bytes to getM>,    Mth web site to monitor: specifies ALL or number of HTML page bytes to retrieve. If ALL, entire page is retrieved.
<Get/Post optionM>      Mth web site to monitor: GET or POST to perform an HTTP GET request or a POST request

Script File Example

VOA RMS Script
* This is a comment line
*
* NOTE: Do not copy and paste the lines below into your script file since they are missing TAB characters!
*       Instead, see the sample file "RMS Script XXXX".
*
SM.W.F. 08:06:30        S       VOA     ENGL    680     AM      RUSS    18      RA14
..T.T.. 08:08:00        B       4       7500    8000    CW      5       150
SMTWTFS 11:29:50        S       VOA     ENGL    680     AM      RUSS    20      RA14
..T.... 11:32:00        S       VOA     TIB     820     AM      RUSS    20      RA28
..T..F. 11:33:30        S       VOA     MAND    95.3    FM      RUSS    20      MP4
* The next event is an FTP event
.M...F. 13:00:00        F       SETTIME GETSCRIPT       SCANSWITHSTUFF   SOUNDS  MAND    ENGL    TIB     NOLOG   10      ftp://user:password@voa.his.com//pub/voa/private/rms/beijing
S.....S 14:15:00        B       3       3500    5000    CW      10      150
S.....S 14:17:00        S       VOA     MAND    680     AM      RUSS    20      RA14
...WT.. 14:45:00        S       VOA     MAND    103.5   FM      RUSS    20      RA28
.M..TF. 15:24:30        S       VOA     ENGL    700     CW      KATH    15      M6
.M.W.F. 16:15:00        S       VOA     TIB     680     AM      RUSS    20      RA28
.M...F. 17:00:30        M       SETTIME GETSCRIPT       SCANS   SOUNDS  MAND    ENGL    TIB     LOG     5       SENDSCRIPT      E-mail subject line     emailaddr1@isp.com      emailaddr2@isp.com
.M...F. 18:00:30        M       SETTIME GETSCRIPT       SCANS   SOUNDS  MAND    ENGL    CHIN    LOG     5       SENDSCRIPT      E-mail subject line     emailaddr1@isp.com      emailaddr2@isp.com   WEBMONITOR   webemailaddr1@isp.com   webemailaddr2@isp.com   webemailaddr3@isp.com   CNN  www.cnn.com  90,REDIRECT,NOFORCETRACE,ALL,GET

Expanded Script File

The script file described above is really the "condensed" version since it allows you to specify multiple days of the week in one script file line. When you transfer a new script file to the RMS Server, it automatically expands the file so that each discrete event on each day is listed one per line. The file is expanded into a new file called "RMS Script File Expanded"; this is the file that the RMS Server actually executes. You really don't need to be concerned with the details of this file other than to know that it exists.