home *** CD-ROM | disk | FTP | other *** search
- EVENTMAN and this documentation are Copyright (C) 1992 by Don Branson.
-
- The programs and documentation may altered only for private use, and may
- not be distributed in any way.
-
- The programs (except for TSRPROC.EXE) and documentation may be distributed.
- No fee may be charged except for media and distribution costs.
- TSRPROC.EXE may not be distributed except by Simian Id Software.
-
-
- Introduction to EVENTMAN
- ------------------------
-
- Many people have expressed a need to be able to have their computers
- run certain processes at a certain time, whether someone was available
- to initiate the process or not. The computer should be able to determine
- when to run the process, instead of requiring human intervention. A
- typical example is people who need to back up PC networks. The backup
- process needs to run every night, after everyone is done working. Until
- now, this has required that either the users are taught to do backups,
- or that the network manager stay until everyone is done working for the
- night. By using EVENTMAN, a backup process can be started late at night,
- without the need for personnel to start it.
-
- Another example is signing on to electronic bulletin board systems
- (BBS's). With a heavily-used BBS, it may be nearly impossible to get on
- except during late night or very early morning hours. With EVENTMAN and
- a progammable terminal program such as Kermit, it is possible to have
- your system sign on to the board early, for example, 2:00 in the morning,
- retrieve messages or files, and sign off again. The messages are then on
- your PC and you can read them with an editor.
-
- A simple example is Daylight Savings time changes. Using EVENTMAN,
- you can have a process execute which sets your PC clock ahead in the
- spring, and back in the fall.
-
- As you use EVENTMAN, you may find that there are many daily routines
- which you perform that can be taken over by EVENTMAN. As you find new
- uses for EVENTMAN, please write and tell us how you are using it. This
- information can be included in future documentation, and will help other
- people as they use EVENTMAN.
-
-
- Concepts
- --------
-
- EVENTMAN works following to basic concepts, the EVENT and the
- PROCESS. An event is a task which performs one or a couple tasks. There
- is no time information associated with an event. Examples of events
- would be backing up a hard drive, signing-on to a BBS, and printing a
- daily report. An event describes the task to be done, but not when it
- should be done. This allows us to describe one task, and execute it
- upon demand.
-
- A process ties together information about tasks (events) to be run
- with time information. A process describes what events to run at what
- times. A process will frequently list a number of events to be run at
- each time specified by the process. A process may occur once, daily,
- weekly, monthly, yearly, or a some interval which you specify, such
- as hourly, or every 3-1/2 hours, for example.
-
- There are three main programs in the EVENTMAN package. The first
- is EVENTMAN. This program is used to create and maintain events and
- processes. PROCESS is a program which runs the processes you have
- created. When PROCESS runs, it runs in the foreground, which means
- that you cannot use other applications while it is running. TSRPROC
- solves this problem, and lets you use your computer while TSRPROC runs
- in the background. TSRPROC is available only to users who register at
- the advanced level.
-
-
-
- The Event/Process Creation Cycle
- --------------------------------
-
- The first step in using EVENTMAN is to set up some events. In the
- samples given with EVENTMAN are some useful events which can be included
- in your processes. Some examples are DISPTIME, which displays the current
- system time. This can be used to print the start and end times of
- your processes. Another is LINE, which is useful for drawing a separator
- line between each event or process.
-
- The second step is to use EVENTMAN to set up processes to run at
- preset times.
-
- Once the events and processes are set up, use either PROCESS or
- TSRPROC to run the processes. The processes will execute at the times
- you specify, and will invoke the events in the order that you list them.
-
-
- EVENTMAN
- --------
-
- Keyboard
-
- The function keys available are always listed at the bottom of the
- screen. In addition, the keys HOME, END, Page Up, Page Down, Insert,
- Delete, Backspace, Tab, Shift-Tab, and the arrow keys are functional in
- the Event Menu, the Process Menu, and data entry fields.
-
- Events
-
- When you run EVENTMAN, you should always be in a directory which
- contains EVENTMAN and all the associated event and process files. Enter
- EVENTMAN by typing EVENTMAN at the DOS prompt and pressing Enter. The
- screen will show a scrollable list of events. The number of events you
- see will depend on whether you are using a 25, 43, or 50 line display.
- The available functions keys are displayed at the bottom of the screen.
- The F1 key offers context-sensitive help screens. Each line in the event
- list is an event with a name of up to 8 characters, and a description of
- up to 60 characters. Each event also includes a file of DOS commands. To
- edit the file of DOS commands for an existing event, press F2.
-
- EVENTMAN is set up to use whatever editor you want it to. By default,
- it first tries to use the editor supplied to registered users. If that
- is not available, it will try to use the DOS 5.00 editor. If that is not
- available, it will use EDLIN. You can over-ride this process by telling
- EVENTMAN to use your favorite editor. For example, assume you want to
- use the QEDIT editor. This is executed by typing "Q" at the DOS prompt,
- so you can tell EVENTMAN to execute this editor by typing the following
- command before entering EVENTMAN:
-
- SET EDITOR=Q
-
- This will work if Q is in a directory on your PATH. If it is not,
- supply the full path name:
-
- SET EDITOR=C:\QEDIT\Q
-
- To create a new event, press the F3 key. EVENTMAN will ask you for
- an event name and a description. Press ESC to cancel or Enter to create
- the new event. If you create a new event, you will automatically be taken
- into the editor to enter the DOS commands for the event.
-
-
- To delete an existing event, use the F4 key. You will be requested
- to enter the word 'delete' to confirm that you want to delete the event.
- Typically, it is not necessary to delete events, since they only are
- invoked if they are included in processes.
-
- To return from the EVENTMAN Event Menu to the DOS prompt, press F6.
-
- To continue from the EVENTMAN Event Menu to the Process Menu,
- press F5.
-
-
- Processes
-
- Each process contains information about the date and time that the
- process should be run. The Process Menu lists each process, the process
- type, and the next execution date and time. To edit a process, press F2.
- You will be shown the process name, and you may change any of the other
- parameters. To move from parameter to parameter, use the Tab and Shift-
- Tab keys.
-
- The first parameter is the process type. The type indicates how often
- the process is repeated. Valid values here are:
-
- D - Daily The process is repeated every day at the same time.
- W - Weekly The process is repeated every week on the same
- weekday at the same time.
- M - Monthly The process is repeated every month on the same day
- of the month, at the same time.
- Y - Yearly The process is repeated every year, in the same
- month, on the same day of the month, at the same
- time.
- S - Single The process is not repeated. It is run once, then
- deleted from the process list.
- O - Other The process is repeated at the interval you specify.
- The interval is given in minutes, and you will be
- asked for the interval only for type 'O' processes.
-
- The next field of entry is the date field. This indicates the next
- date when the process will be executed. You can enter any date here.
- You might even enter, for example, a daily process which first starts a
- month from now, by entering the first date of execution at that future
- date. Note that the date must be entered year first, then month, then
- day. The date is converted to a text format and displayed next to your
- entry. The year must be four digits. (We're getting close to the year
- 2000!)
-
- The next field is the time field. The time field is entered in a 24-
- hour clock format. EVENTMAN will display the time in text format next to
- your entry, for confirmation.
-
- If you entered a process type of 'O', the next field will be the
- interval between executions. This interval is from start to start, so
- the length of time your process takes will not affect the starting time
- of the next process. The interval is indicated in minutes. A process to
- run every other day then, would have an interval of 2880 minutes.
-
- The final field to enter is the list of events invoked each time the
- process executes. The events must be valid event names, listed in order
- of execution, separated by commas.
-
- From the process menu, processes can be added with F3, or deleted
- with F4. When adding a process, you will be asked for the same
-
-
- information as when you are editing an existing process. When you delete
- a process, you will be asked to enter 'delete' to confirm. Use F6 to
- return from entering a process to the Process Menu. F6 will also return
- from the Process Menu to the Event Menu.
-
-
- PROCESS
- -------
-
- PROCESS is a program which runs in the foreground. It maintains the
- list of processes in order by date and time. The list of processes is
- displayed on the screen. The next process to execute is displayed first
- on the list. When it is time to run the first process in the list,
- PROCESS invokes that process. When the process is complete, PROCESS
- updates the process and re-orders the list.
-
- Command line options
-
- PROCESS has one command-line option which allows processes to be
- tested in a short period of time which would normally run over days or
- weeks. To do this, use the -txxxx option for PROCESS, where 'xxxx'
- indicates a number of seconds. This will make PROCESS add 5 minutes
- to your system every xxxx seconds, and speed up testing. When you exit
- PROCESS, it will correct the date and time. You should always verify that
- the date and time were re-set correctly after using this option.
-
- PROCESS startup
-
- When PROCESS starts up, it will update the date and time on any
- process which has not executed, until the date and time are after the
- current system date and time. Processes which are invoked every few
- minutes may take some to update in this manner, especially if they are
- months or years old. Therefore, it is recommended that you use EVENTMAN
- to update these old processes manually before running PROCESS.
-
- TSRPROC
- -------
-
- TSRPROC is the TSR (Terminate-and-Stay-Resident) version of the
- PROCESS program. TSRPROC will run in the background, waiting for a
- process to become current, and ready to execute. While TSRPROC is
- running in the background, you can use your system for other tasks, such
- as editing files, doing spreadsheets, whatever you need to work on. When
- the date and time on a process matches the system date and time, it
- "becomes current," which means that it is time to invoke that process.
- If you are working in some other application when a process becomes
- current, TSRPROC will not try to run it. You have the option of
- indicating if TSRPROC should try again when you are done. TSRPROC will
- only try to run a process if you are at the DOS command prompt.
-
- To use TSRPROC, execute it once at the command line, specifying any
- command-line options you want. TSRPROC stays in memory, and will invoke
- processes as they become current, but only if you are at a DOS prompt,
- never interrupting your current task.
-
- When TSRPROC is resident, you can use Alt-LeftShift to display the list of
- waiting processes.
-
- Command-line options
- --------------------
-
- These are the command-line options available with TSRPROC. They may be
- selected using either a dash (as in "-h") or a slash (as in "/h"):
-
- -h Display Help. This shows each command-line option and gives
- a brief description. TSRPROC does not stay in memory after
- displaying help, and does not do any processing.
-
- -u Unload the resident TSRPROC. By invoking TSRPROC with this
- option, no processing takes place, and the TSRPROC that was
- already loaded is unloaded from memory.
-
- -p Past processes. When you select this flag, TSRPROC will run
- processes that have a date and time stamp prior to the
- current time before beginning normal processing.
-
- -cxx Check-wait. TSRPROC checks the system time every 5 seconds,
- by default, to see if any processes are current. This ensures
- that any process will be executed within 5 seconds after it
- becomes current. Use this option to change the frequency with
- which TSRPROC checks the system time. Making the time too
- short may degrade system perform. Making the time longer than
- 60 seconds will mean that your processes may start a minute
- or two late. The number of seconds 'xx' is the length of
- time TSRPROC waits between attempts.
-
- -r Retry. If TSRPROC checks to see if a process can be run, and
- you are in an application, the process will not be run. By
- using this option, you tell TSRPROC to try again, until the
- process can execute.
-
- -d Debug. If you have problems with TSRPROC, try to reproduce
- the problem. When you run TSRPROC to reproduce the problem,
- specify this option, and also re-direct the output of TSRPROC
- to the printer, if you have one. Don't try to re-direct
- output to a file, as this can cause problems. This is how to
- enter the TSRPROC command with this option:
-
- TSRPROC -d >prn
-
- -t Test mode. This displays processes only and does not try to
- invoke them.
-
-
- Utility programs
- ----------------
-
- DOW
-
- This is the Day-Of-Week program. This small program's purpose is to
- return the day of the week in the DOS error code. This error code can then
- be used in batch files for determining the day of the week. The codes
- returned are 0-6 for Sunday through Saturday. The file CDAYBACK.BAT (included
- with EVENTMAN) is an example of how to use DOW. It shows a single process
- that is to be run every day but one day of the week.
-
- Listing of CDAYBACK.BAT:
-
- : CBACKUP.COM is a program that I use for backing-up to tape. CBACKUP.BAT
- : is included instead of the .COM file, for the purpose of the
- : demonstration.
-
- echo off
- dow
- if errorlevel 6 goto saturday
- if errorlevel 5 goto friday
- if errorlevel 4 goto thursday
- if errorlevel 3 goto wednesday
- if errorlevel 2 goto tuesday
- if errorlevel 1 goto monday
- if errorlevel 0 goto sunday
- goto exit
- :sunday
- echo Today is Sunday - Don't do a backup
- goto exit
- :monday
- echo Today is Monday - Do a backup
- cbackup
- goto exit
- :tuesday
- echo Today is Tuesday - Do a backup
- cbackup
- goto exit
- :wednesday
- echo Today is Wednesday - Do a backup
- cbackup
- goto exit
- :thursday
- echo Today is Thursday - Do a backup
- cbackup
- goto exit
- :friday
- echo Today is Friday - Do a backup
- cbackup
- goto exit
- :saturday
- echo Today is Saturday - Do a backup
- cbackup
- goto exit
- :exit
- exit
- echo Procedure cbackup complete.
-
-
-
- CBACKUP.COM, executed by CDAYBACK.BAT, is a program that was created with
- the tape backup software that is supplied with the Identity Tape Drive.
- CBACKUP.BAT is supplied in lieu of the .COM file in the EVENTMAN package, so
- that you can see how it would work. You will create your own backup program,
- since this is dependent on the hardware and software that you own.
-
- DTIME
-
- This is the Display TIME program. It displays the current date and time
- in a readable format. It is used in an event to display the current date and
- time. (See the sample event DISPTIME.) Processes can then invoke this event
- at the beginning and end of a process, to indicate processing time
- information.
-
- EVENTMAN Examples
- -----------------
-
-
- Unattended Hard Drive Backup
-
- See the example event BACKUP. It executes a batch file (CDAYBACK.BAT)
- which invokes a backup program that comes with the particular tape backup
- that I use. You will need to change it to use whatever software you have
- available with your drive.
-
-
- Signing on to a BBS using Kermit
-
- In order to automatically sign on to a BBS and retrieve messsages or
- files, you will need Kermit or some other programmable terminal program. A
- sample is included with EVENTMAN that signs on to a local BBS and retrieves
- un-read messages from a certain section of the BBS. You will need to have
- KERMIT in order to use this event in a process. Also, since all BBS's have
- different signon procedures, you will need to tailor AUTOLOG.KRM to work on
- your favorite BBS. AUTOLOG.KRM is the Kermit script which dials and logs on to
- the BBS. AUTOLOG.KRM is designed to work with a Hayes-compatible modem. Start
- with the event KERMIT, and follow the code from there, to see how the process
- works.
-
-
- Handling Daylight Savings time
-
- See the event SPRG_AHD. It is used to set the date ahead on a specific date.
-