home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
- RAMAINT.EXE
-
- Copyright 1994 by Pass - the - Buck SoftWare
- 18101 E. 19th St. N.
- Independence, Mo.
- 64058
-
- (RA versions 1.1x and 2.0x)
-
- RAMAINT is designed to be used as an event task scheduler for
- RemoteAccess BBS systems. RAMAINT replaces endless calls to batch
- files that need only be run on a weekly or monthly basis with a
- schedule of events to be performed ONLY when needed. RAMAINT
- optimizes events and keeps the system on-line more of the time.
-
- RAMAINT allows the sysop the freedom to change bulletin files or
- menu screens or welcome messages on a per call, daily, weekly or
- monthly basis. System maintenance items which were either done by
- hand or left undone for lack of an automated approach can now be
- scheduled in advance and forgotten.
-
- Unlike menu driven maintenance utilities, RAMAINT doesn't try to
- do everything in its own way. It allows you the freedom to use your
- favorite programs and utilities any way you see fit, anytime you wish.
-
- RAMAINT is FAST, configurable and occupies less than 25K of disk
- space.
-
-
- OBLIGATORY SHAREWARE LICENSE AGREEMENT:
-
- What can I say that hasn't been said before. Well, how about,
- "You DON'T have to stop using this utility after 30 days!"
-
- Use it forever if you like it and find it useful. If you want to
- register it, just send $10 U.S. and an S.A.S.E. and you will receive
- a registration code that will give you the "enhanced" options. When
- registering you must give me the name of your BBS and the SysOp name
- EXACTLY AS IT APPEARS IN RACONFIG(!). Capitalization, punctuation and
- spacing are important.
-
- Payment may be made in the form of CASH, CHECK or MONEY ORDER.
- Make checks and M.O.'s payable to Dave Perry and send to the address
- shown at the top of this document.
-
- Normal care has been taken in testing this software for bugs and
- reliability. It is guaranteed only to work on MY system. Odds are
- that it will work on yours, too, but I will not be responsible for ANY
- damages resulting from the use or abuse of this software. Use of this
- software constitutes an agreement to these terms. Use of this
- software in any area where state or local law requires warranty or
- proofs of suitability for purpose or any other restriction is strictly
- PROHIBITED.
-
-
-
- RAMAINT CONFIG STRUCTURE:
-
- RAMAINT.CFG is a normal ASCII text file containing both internal
- and external commands. ALL RAMAINT.CFG commands and information lines
- may appear in ANY order in the config file. The config file may
- contain comments.
-
- While the order is not important, certain other parameters are.
- The following are hard and fast rules which will avoid problems in
- configuration:
-
- All comments MUST have a ';' as the first non-white space
- character.
-
- All comment lines must be stand alone. You should NOT include a
- comment on a command line.
-
- Spacing is NOT important on a command line. Separators may
- include spaces or tabs to make the file easier to read or "prettier".
-
- All blank lines in the config file should have a ';' as the first
- character and will be treated as comments. (blank lines should NOT
- cause errors in the operation of the program but do waste time.)
-
- All lines in the config file are executed in the ORDER they are
- listed (with the exception of the BOOT command) as long as the
- operational parameters are met.
-
-
- NOTE: All config file lines are limited to 95 characters in
- length - MAXIMUM!
-
-
- INTERNAL COMMANDS:
-
-
- SERIAL xxxxxxxxxx
-
- If included in the config file will open the registered features
- for use by RAMAINT.EXE. This is the number supplied when money changes
- hands. While it appears that most, if not all, of the registered
- features can be implemented by calling DOS and BATCH file routines,
- more features are on the way which would be much more difficult to
- emulate.
-
-
- LOG drive:\path\file.ext
-
- This line directs RAMAINT to place its activity log in the
- indicated log file. This can be the RA log if you prefer or you can
- use a stand alone RAMAINT.LOG. The .log output of RAMAINT fits nicely
- in the RA log and gives a complete report of the maintenance run in a
- "Maintenance log" block. If you do not include a log path RAMAINT will
- create a file called RAMAINT.TMP in the current directory which will
- remain until the next run of the program. It will then be replaced
- with a temporary log of its next run so you won't have another space
- consuming, seldom viewed log.
-
- Errors are always written to RAMAINT.ERR in the current directory
- and this file remains from run to run so that errors can be reviewed
- at any time.
-
- Different .CFG files, intended for different events, may have
- different log files or none at all. This allows you to use the RA log
- for the daily maintenance event and a different log or none at all for
- the other "between calls" events.
-
-
- CLEANLOG drive:\path\file.ext
-
- This line may be used in place of the above to keep OTHER
- utilities that run from the RAMAINT environment from writing to the
- named log file. It does this by simply renaming the log file,
- allowing the utilities to write to the named file, then deletes the
- named file and replaces it with the old log. It then adds the
- contents of RAMAINT.TMP to the end of the file.
-
- If you use a log-splitter to create daily logs (such as the
- LOGPACK.BAT included) you MUST RUN IT BEFORE CALLING RAMAINT!
-
-
- ONCE
-
- If this appears in the config file, the program will only run
- once per 24 hour day. If called accidentally or as part of a recurrent
- batch file, RAMAINT will NOT execute (see TEST exception) until after
- midnight according to the system clock.
-
- If word ONCE does NOT appear in the config file, RAMAINT will run
- each time it is called. Intended or not.
-
- RAMAINT can be used with multiple configuration files as you will
- see, but only ONE .cfg file may contain the ONCE command. I suggest
- that the ONCE command be reserved for the main daily system event.
- Normally, this is the only one that you will want to run only one time
- per day.
-
-
-
- IFEXIST drive:\path\file.ext
-
- The IFEXIST keyword checks for the presence of the named file as
- a condition for execution along with the day/date specified. If the
- file exists in the location specified then all commands within the
- block up to the ENDIF keyword will be executed.
-
- Within the block, day/date specifiers are not allowed. The
- day/date specifier for the IFEXIST statement is assumed to be valid
- for all statements within the block.
-
-
- IFNOTEXIST drive:\path\file.ext
-
- The same as the IFEXIST keyword above except executes only if the
- named file DOES NOT exist.
-
- NOTE: Wildcard file specifiers are NOT supported in either of the
- IF block commands!
-
- ENDIF
-
- The ENDIF keyword ends the block of instructions initiated by
- either the IFEXIST or IFNOTEXIST keywords. All instruction blocks
- MUST be terminated by the use of the ENDIF keyword.
-
- IF blocks may NOT be nested and each MUST have its own ENDIF
- statement. A configuration file may contain as many IF blocks as
- necessary.
-
-
-
- BOOT (Registered)
-
- If this appears after any command parameter anywhere in the
- config file, the system will re-boot when RAMAINT is FINISHED. All
- commands in the config file with matching day/date parameters will be
- executed FIRST.
-
- The BOOT command MUST be prefaced by a command parameter (day -
- date) and assumes that if there is a diskette in drive A: it was left
- there accidentally and attempting a BOOT would cause a system error.
- BOOT WILL NOT OPERATE WITH A DISK IN DRIVE A: !!! It will instead
- ignore the command and RAMAINT will exit with error level 5 causing
- the system to return to normal operation unbooted. What you do with
- the error level is up to you. It's there for information only and has
- no effect on the operation of the system. You may, however, trap for
- it in the RA batch file that calls RAMAINT and do what you wish with
- the information.
-
-
-
- TOUCH Drive:\path\file.ext (Registered)
-
- TOUCH is an internal command that 'Touches' a files Date / Time
- stamp in a disk directory. TOUCH must be prefaced with a day/date
- specifier. The filename MUST be complete, including drive and path.
- This function may be used to reset bulletin files and 'ONCEONLY'
- screens so that users see them once a day/week/month. TOUCH sets the
- file date and time stamp of the indicated file to the current system
- clock values with the seconds rounded off to zero.
-
- NOTE: TOUCH does NOT support WildCard file specifications.
-
-
- COMMAND PARAMETERS:
-
- Each command intended for execution by RAMAINT must be prefaced
- by a day/date specifier. This parameter tells RAMAINT whether or not
- to process this command on this particular run.
-
-
- XX (Day of the month)
-
- If the command line begins with the day of the month (01 - 31)
- and the system clock indicates that date then the command will be
- processed. The day of the month MUST be entered as a 2 digit value
- with a leading zero (not a letter 'o') for values less than 10.
-
-
- Sun (Day of the week)
-
- A 3 letter string indicating the day of the week will cause the
- command to be processed ONLY on that day. The day MUST be the standard
- three letter day indicator, (i.e.; SUN MON TUE WED THU FRI SAT) and
- may be any combination of upper and lower case.
-
-
- 00 or Daily
-
- If the command line begins with either of the above strings then
- the command will be processed each time the utility runs. This
- parameter will match ANY day or date.
-
-
-
- TEST
-
- Since you may not wish to wait till system event time to see if a
- particular command will run with RAMAINT, the TEST parameter will
- cause RAMAINT to run NOW with the command that follows. If it operates
- in TEST mode you can rest easy that it will run in the event.
-
- You may only run ONE test at a time. The log files are not
- updated for the TEST run and internal commands (registered features)
- may be run in TEST mode.
-
- TEST allows you to check that sufficient space is available for
- proper operation and that the command line parameters are exactly
- correct for what you intended to do. When the TEST is complete,
- replace the TEST with the parameter that will run the function when
- you wish.
-
-
-
- COMMAND MODIFIERS:
-
- DOS
-
- All calls to DOS functions MUST be prefaced with the DOS command
- modifier. This tells RAMAINT to present the line to DOS exactly as it
- is written. This command may be used for such DOS commands as 'del' so
- that certain files may be deleted on certain days. (Like those seldom
- viewed LOG files from all those OTHER RA utils!)
-
- Remember, DOS calls that require user input should NOT be used as
- this will cause the system to stall waiting for keyboard entry. It is
- always best to run DOS calls in the TEST mode before assuming they
- will operate as intended in the system event.
-
-
- SYS
-
- Some executable programs (.COM & .EXE) require a new instance of
- DOS to operate properly because of spawns they make in normal
- operation. These programs will error out when run straight from
- RAMAINT. For these programs, which you will find with the TEST
- option, use the modifier SYS. This will allow almost ANY program to
- run normally from the RAMAINT environment but will NOT return an
- errorlevel.
-
-
- HOW IT WORKS:
-
- RAMAINT has no restrictions on the number or length of
- configuration files. If called without a command line parameter
- RAMAINT looks for the file RAMAINT.CFG in the directory where it
- lives. If no command line parameters are offered and RAMAINT.CFG
- cannot be located it will create a RAMAINT.ERR file and error out.
-
- To call RAMAINT using another configuration file simply place the
- path and filename on the command line: RAMAINT C:\RA\LEVEL35.CFG
-
- RAMAINT reads the entire configuration file once looking for
- paths to log files, setting flags for ONCE, BOOT, IF blocks and TEST
- calls. RAMAINT then resets itself to the top of the file and reads in
- the first valid command. This command is processed and the next one
- is read. Invalid commands (those not matching the day/date specifier
- or TEST param) are ignored.
-
- When RAMAINT runs, it switches drives and directories as
- necessary to make the drive/directory of the called program the home
- drive/directory. This allows programs having config and data files
- living in the same directory with them to operate as though you had
- explicitly changed drives and directories before running them.
-
- RAMAINT ALWAYS returns to the drive and directory where it lives
- before making the next call or exiting.
-
- When RAMAINT begins, it clears the screen and identifies itself.
- It does the same when the command has been processed and it is looking
- for the next one. When run in the TEST mode, RAMAINT will NOT clear
- the screen when it exits. This allows you to see the screen of the
- program under test. If the program has failed you can usually
- determine why by checking the information provided there.
-
- TEST mode will allow only one TEST per run. If there is more
- than one TEST statement in the configuration file, only the first will
- be processed.
-
- The ONCE parameter is enforced by the file RAMAINT.DAT. Should
- it become necessary to run RAMAINT a second time (use care!) you may
- either use the ';' character to comment out the ONCE param in the
- configuration file or delete the RAMAINT.DAT file.
-
-
- SETTING UP:
-
- I have included all the files from my RA system (run from
- RUNFD.BAT & EXEBBS.BAT) as examples of how to implement RAMAINT. I
- have also included my "REAL" configuration files and a sample log
- which resulted from running these configs.
-
- When setting up for the first time I suggest that you start with
- a "clean" .cfg file (just the SERIAL, LOG & ONCE statements) and build
- a config file by using the TEST parameter on a line by line basis.
-
- Once the target program runs as expected, replace the TEST
- keyword with a day/date specifier and go on to the next line. This
- proceedure may sound time consuming and tedious but is actually pretty
- easy and once you have done a few lines, it becomes downright simple.
-
- I suggest that you REM out the calls now being made in your RA
- batch file one at a time and place the calls in the configuration one
- at a time. Be sure to add the call to RAMAINT in your .BAT file so it
- will be called in place of the programs you have replaced. Once the
- program calls have been proven to work properly in RAMAINT you can
- delete the REM'd out statements in the RA.BAT.
-
- Some of the .BAT files you are now using can be called directly
- from RAMAINT but some you may want to simplify by making the calls
- directly from RAMAINT and do away with the .BAT's entirely. RAMAINT
- runs faster than .BAT files and also logs the errorlevel returned by
- .COM and .EXE files.
-
-
-
-
-
-
-
- SAMPLE RAMAINT.CFG:
-
- SERIAL 0000000000
- ;
- ;This is a comment line .... it may be ignored...
- ;
- ;This is the path/file for the log
- ;LOG c:\ra\callers.log
- ;
- ;Use the following IN PLACE OF the above to prevent utilities
- ;called by RAMAINT from writing to the log file. Only the report
- ;generated by RAMAINT will be placed in the log.
- ;If you use this option, split the log to ystdy.log and oldlog.log
- ;in the batch file BEFORE calling RAMAINT... the named log does NOT
- ;exist while RAMAINT is running!
- CLEANLOG c:\ra\callers.log
- ;
- ;Tell RAMAINT to run only one time in a system clock day
- ;in case it is called accidentally.
- ONCE
- ;
- ;
- ;Backup users files everyday.
- ;The DOS keyword is necessary to run dos commands from RAMAINT
- 00 DOS copy c:\ra\msgbase\users.bbs d:\backup
- 00 DOS copy c:\ra\msgbase\usersidx.bbs d:\backup
- 00 DOS copy c:\ra\msgbase\usersxi.bbs d:\backup
- ;
- ;First day of the month - delete giant log to save disk-space
- ;and timelog.bbs so time graph is current in RA
- 01 DOS del c:\ra\oldlog.log
- 01 DOS del c:\ra\timelog.bbs
- ;
- ;All spawned programs MUST include complete paths/filename and EXT!!
- ;If it does not include an EXT it won't run!!
- ;
- ;Stuff we want to test to see if it works properly in the RAMAINT
- ;environment.... TEST replaces the date/day specifier.
- ;TEST c:\ra\test.bat /param1 /y /foobfile
- ;
- ;The TEST mode allows you to run RAMAINT without executing programs
- ;other than the test program. This allows you to tweak command lines
- ;to be sure it will function when it runs by itself in the middle of
- ;the night. The ONCE param is ignored. You may TEST as much as you
- ;wish. In test mode, log writes are NOT performed... keep it clean.
- ;A log file called RAMAINT.TMP is generated as is RAMAINT.ERR in the
- ;event of an error.
- ;
- ;We do the nodediff file on Sunday nite as it can come in Sat or Sun.
- MON c:\ra\nodefix.bat
- ;
- ;Sunday we do game maintenance
- SUN c:\ra\bandit\tbmaint.exe
- SUN c:\ra\bj\bj.exe maint
- SUN c:\ra\timebank\igame10.exe /P
- ;
- ;Stuff we have to do everyday - will be processed in the order
- ;they are listed. You may use 00 as the date or keyword DAILY.
- ;Either will execute everyday.
- 00 c:\ra\arrlbull.bat
- ;
- 00 sys c:\ra\fmail\ftools.exe maint /d /n /p
- ;Note the use of the SYS modifier in the call to FTOOLS.
- ;Without it FTOOLS.EXE cannot locate its config file.
- ;
- 00 c:\ra\rafile.exe import
- 00 c:\ra\rafile.exe update *.*
- 00 c:\ra\rafile.exe clean /km
- 00 c:\ra\rafile.exe sort
- 00 c:\ra\rafile.exe export
- 00 c:\ra\rafile.exe filelist c:\local\280-19.lst /S20 /Bc:\ra\file.hdr
- 00 c:\ra\rafile.exe filelist c:\local\280-19.new /S20 /D30
- 00 c:\dos\ARJ.EXE m -e -f c:\local\hs-files.arj c:\local\280-19.lst
- 00 c:\dos\ARJ.EXE m -e -f c:\local\hs-new.arj c:\local\280-19.new
- 00 c:\ra\rafile.exe hs-*.arj 90 touchmod
- 00 c:\ra\rauser.exe -d7 -m10 -v
- 00 c:\ra\rauser.exe -d120 -m25 -v
- 00 c:\ra\rauser.exe -s
- 00 c:\ra\rabday.exe
- ;
- ;Stuff we do if a file exists on the 15th of the month
- ;15 ifexist c:\ra\test.bat
- ;c:\ra\test.bat
- ;endif
- ;
- ;Stuff we do if a file does NOT exist on the 12th of the month
- ;12 ifnotexist c:\ra\test.bat
- ;c:\ra\util\makebat.exe /test /loop
- ;endif
- ;Any number of program calls can go between the if and the endif
- ;no date is used on the program calls between the if and the endif
- ;WILDCARDS will NOT work in the if statements. See TOUCH.
- ;
- ;
- ;Do the onceonly.A?? files to make it look like the sysop cares
- ;enough to actually do something on this board.
- SAT DOS copy c:\ra\txtfiles\lastday.* c:\ra\txtfiles\onceonly.*
- ;NOTE : Dos can handle the wildcard correctly
- ;Touch is an internal command and must have an explicit filename.
- ;Sorry, but to make this thing small enough to let ANYTHING run
- ;it was necessary to make some trade-offs.
- SAT TOUCH c:\ra\txtfiles\onceonly.ans
- SAT TOUCH c:\ra\txtfiles\onceonly.asc
- SUN DOS copy c:\ra\txtfiles\newtourn.* c:\ra\txtfiles\onceonly.*
- SUN TOUCH c:\ra\txtfiles\onceonly.ans
- SUN TOUCH c:\ra\txtfiles\onceonly.asc
- MON DOS copy c:\ra\txtfiles\oncetext.* c:\ra\txtfiles\onceonly.*
- MON TOUCH c:\ra\txtfiles\onceonly.ans
- MON TOUCH c:\ra\txtfiles\onceonly.asc
- ;
- ;Touch sets the specified file date and time to current system values.
- ;
- ;Boot the computer when all has been done. This keyword may appear
- ;anywhere in the file and will operate only after all else is done.
- ;If you screw up and leave a disk in drive A: that would cause the
- ;boot to fail this operation will be ignored.
- ;00 BOOT
-
- Please address any comments, questions, suggestions and
- criticisms to the author via FIDONET direct NETMAIL.
-
- The latest version of RAMAINT.EXE may be freq'd from The HamShack
- BBS, Fidonet 1:280/19 or The Sounding Board BBS, Fidonet 1:280/32
- (MAGIC NAME: RAMAINT) or you may log on to the HamShack BBS at
- (816) 796-6695 and download it from the opening screen.
-
- Dave Perry
- The HamShack BBS
- 1:280/19
- (816)796-6695
-
-
- The author wishes to thank Brian Pirie for allowing the usage of his
- REGISTRATION KEY SYSTEM FOR PROGRAMMERS - Version 2.20.
- (C) Copyright 1992, Brian Pirie. All rights reserved.
-