home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / e / em200.zip / EVENTMAN.DOC < prev    next >
Text File  |  1992-04-29  |  18KB  |  408 lines

  1. EVENTMAN and this documentation are Copyright (C) 1992 by Don Branson.
  2.  
  3. The programs and documentation may altered only for private use, and may
  4. not be distributed in any way.
  5.  
  6. The programs (except for TSRPROC.EXE) and documentation may be distributed.
  7. No fee may be charged except for media and distribution costs.
  8. TSRPROC.EXE may not be distributed except by Simian Id Software.
  9.  
  10.  
  11. Introduction to EVENTMAN
  12. ------------------------
  13.  
  14.     Many people have expressed a need to be able to have their computers
  15. run certain processes at a certain time, whether someone was available
  16. to initiate the process or not. The computer should be able to determine
  17. when to run the process, instead of requiring human intervention. A
  18. typical example is people who need to back up PC networks. The backup
  19. process needs to run every night, after everyone is done working. Until
  20. now, this has required that either the users are taught to do backups,
  21. or that the network manager stay until everyone is done working for the
  22. night. By using EVENTMAN, a backup process can be started late at night,
  23. without the need for personnel to start it.
  24.  
  25.     Another example is signing on to electronic bulletin board systems
  26. (BBS's). With a heavily-used BBS, it may be nearly impossible to get on
  27. except during late night or very early morning hours. With EVENTMAN and
  28. a progammable terminal program such as Kermit, it is possible to have
  29. your system sign on to the board early, for example, 2:00 in the morning,
  30. retrieve messages or files, and sign off again. The messages are then on
  31. your PC and you can read them with an editor.
  32.  
  33.     A simple example is Daylight Savings time changes. Using EVENTMAN,
  34. you can have a process execute which sets your PC clock ahead in the
  35. spring, and back in the fall.
  36.  
  37.     As you use EVENTMAN, you may find that there are many daily routines
  38. which you perform that can be taken over by EVENTMAN. As you find new
  39. uses for EVENTMAN, please write and tell us how you are using it. This
  40. information can be included in future documentation, and will help other
  41. people as they use EVENTMAN.
  42.  
  43.  
  44. Concepts
  45. --------
  46.  
  47.     EVENTMAN works following to basic concepts, the EVENT and the
  48. PROCESS. An event is a task which performs one or a couple tasks. There
  49. is no time information associated with an event. Examples of events
  50. would be backing up a hard drive, signing-on to a BBS, and printing a
  51. daily report. An event describes the task to be done, but not when it
  52. should be done. This allows us to describe one task, and execute it
  53. upon demand.
  54.  
  55.     A process ties together information about tasks (events) to be run
  56. with time information. A process describes what events to run at what
  57. times. A process will frequently list a number of events to be run at
  58. each time specified by the process. A process may occur once, daily,
  59. weekly, monthly, yearly, or a some interval which you specify, such
  60. as hourly, or every 3-1/2 hours, for example.
  61.  
  62.     There are three main programs in the EVENTMAN package. The first
  63. is EVENTMAN. This program is used to create and maintain events and
  64. processes. PROCESS is a program which runs the processes you have
  65. created. When PROCESS runs, it runs in the foreground, which means
  66. that you cannot use other applications while it is running. TSRPROC
  67. solves this problem, and lets you use your computer while TSRPROC runs
  68. in the background. TSRPROC is available only to users who register at
  69. the advanced level.
  70.  
  71.  
  72.  
  73. The Event/Process Creation Cycle
  74. --------------------------------
  75.  
  76.     The first step in using EVENTMAN is to set up some events. In the
  77. samples given with EVENTMAN are some useful events which can be included
  78. in your processes. Some examples are DISPTIME, which displays the current
  79. system time. This can be used to print the start and end times of
  80. your processes. Another is LINE, which is useful for drawing a separator
  81. line between each event or process.
  82.  
  83.     The second step is to use EVENTMAN to set up processes to run at
  84. preset times.
  85.  
  86.     Once the events and processes are set up, use either PROCESS or
  87. TSRPROC to run the processes. The processes will execute at the times
  88. you specify, and will invoke the events in the order that you list them.
  89.  
  90.  
  91. EVENTMAN
  92. --------
  93.  
  94. Keyboard
  95.  
  96.     The function keys available are always listed at the bottom of the
  97. screen. In addition, the keys HOME, END, Page Up, Page Down, Insert,
  98. Delete, Backspace, Tab, Shift-Tab, and the arrow keys are functional in
  99. the Event Menu, the Process Menu, and data entry fields.
  100.  
  101. Events
  102.  
  103.     When you run EVENTMAN, you should always be in a directory which
  104. contains EVENTMAN and all the associated event and process files. Enter
  105. EVENTMAN by typing EVENTMAN at the DOS prompt and pressing Enter. The
  106. screen will show a scrollable list of events. The number of events you
  107. see will depend on whether you are using a 25, 43, or 50 line display.
  108. The available functions keys are displayed at the bottom of the screen.
  109. The F1 key offers context-sensitive help screens. Each line in the event
  110. list is an event with a name of up to 8 characters, and a description of
  111. up to 60 characters. Each event also includes a file of DOS commands. To
  112. edit the file of DOS commands for an existing event, press F2.
  113.  
  114.     EVENTMAN is set up to use whatever editor you want it to. By default,
  115. it first tries to use the editor supplied to registered users. If that
  116. is not available, it will try to use the DOS 5.00 editor. If that is not
  117. available, it will use EDLIN. You can over-ride this process by telling
  118. EVENTMAN to use your favorite editor. For example, assume you want to
  119. use the QEDIT editor. This is executed by typing "Q" at the DOS prompt,
  120. so you can tell EVENTMAN to execute this editor by typing the following
  121. command before entering EVENTMAN:
  122.  
  123.         SET EDITOR=Q
  124.  
  125.     This will work if Q is in a directory on your PATH. If it is not,
  126. supply the full path name:
  127.  
  128.         SET EDITOR=C:\QEDIT\Q
  129.  
  130.     To create a new event, press the F3 key. EVENTMAN will ask you for
  131. an event name and a description. Press ESC to cancel or Enter to create
  132. the new event. If you create a new event, you will automatically be taken
  133. into the editor to enter the DOS commands for the event.
  134.  
  135.  
  136.     To delete an existing event, use the F4 key. You will be requested
  137. to enter the word 'delete' to confirm that you want to delete the event.
  138. Typically, it is not necessary to delete events, since they only are
  139. invoked if they are included in processes.
  140.  
  141.     To return from the EVENTMAN Event Menu to the DOS prompt, press F6.
  142.  
  143.     To continue from the EVENTMAN Event Menu to the Process Menu,
  144. press F5.
  145.  
  146.  
  147. Processes
  148.  
  149.     Each process contains information about the date and time that the
  150. process should be run. The Process Menu lists each process, the process
  151. type, and the next execution date and time. To edit a process, press F2.
  152. You will be shown the process name, and you may change any of the other
  153. parameters. To move from parameter to parameter, use the Tab and Shift-
  154. Tab keys.
  155.  
  156.     The first parameter is the process type. The type indicates how often
  157. the process is repeated. Valid values here are:
  158.  
  159.       D - Daily      The process is repeated every day  at the same time.
  160.       W - Weekly     The process is repeated every week on the same
  161.                      weekday at the same time.
  162.       M - Monthly    The process is repeated every month on the same day
  163.                      of the month, at the same time.
  164.       Y - Yearly     The process is repeated every year, in the same
  165.                      month, on the same day of the month, at the same
  166.                      time.
  167.       S - Single     The process is not repeated. It is run once, then
  168.                      deleted from the process list.
  169.       O - Other      The process is repeated at the interval you specify.
  170.                      The interval is given in minutes, and you will be
  171.                      asked for the interval only for type 'O' processes.
  172.  
  173.     The next field of entry is the date field. This indicates the next
  174. date when the process will be executed. You can enter any date here.
  175. You might even enter, for example, a daily process which first starts a
  176. month from now, by entering the first date of execution at that future
  177. date. Note that the date must be entered year first, then month, then
  178. day. The date is converted to a text format and displayed next to your
  179. entry. The year must be four digits. (We're getting close to the year
  180. 2000!)
  181.  
  182.     The next field is the time field. The time field is entered in a 24-
  183. hour clock format. EVENTMAN will display the time in text format next to
  184. your entry, for confirmation.
  185.  
  186.     If you entered a process type of 'O', the next field will be the
  187. interval between executions. This interval is from start to start, so
  188. the length of time your process takes will not affect the starting time
  189. of the next process. The interval is indicated in minutes. A process to
  190. run every other day then, would have an interval of 2880 minutes.
  191.  
  192.     The final field to enter is the list of events invoked each time the
  193. process executes. The events must be valid event names, listed in order
  194. of execution, separated by commas.
  195.  
  196.     From the process menu, processes can be added with F3, or deleted
  197. with F4. When adding a process, you will be asked for the same
  198.  
  199.  
  200. information as when you are editing an existing process. When you delete
  201. a process, you will be asked to enter 'delete' to confirm. Use F6 to
  202. return from entering a process to the Process Menu. F6 will also return
  203. from the Process Menu to the Event Menu.
  204.  
  205.  
  206. PROCESS
  207. -------
  208.  
  209.     PROCESS is a program which runs in the foreground. It maintains the
  210. list of processes in order by date and time. The list of processes is
  211. displayed on the screen. The next process to execute is displayed first
  212. on the list. When it is time to run the first process in the list,
  213. PROCESS invokes that process. When the process is complete, PROCESS
  214. updates the process and re-orders the list.
  215.  
  216. Command line options
  217.  
  218.     PROCESS has one command-line option which allows processes to be
  219. tested in a short period of time which would normally run over days or
  220. weeks. To do this, use the -txxxx option for PROCESS, where 'xxxx'
  221. indicates a number of seconds. This will make PROCESS add 5 minutes
  222. to your system every xxxx seconds, and speed up testing. When you exit
  223. PROCESS, it will correct the date and time. You should always verify that
  224. the date and time were re-set correctly after using this option.
  225.  
  226. PROCESS startup
  227.  
  228.     When PROCESS starts up, it will update the date and time on any
  229. process which has not executed, until the date and time are after the
  230. current system date and time. Processes which are invoked every few
  231. minutes may take some to update in this manner, especially if they are
  232. months or years old. Therefore, it is recommended that you use EVENTMAN
  233. to update these old processes manually before running PROCESS.
  234.  
  235. TSRPROC
  236. -------
  237.  
  238.     TSRPROC is the TSR (Terminate-and-Stay-Resident) version of the
  239. PROCESS program. TSRPROC will run in the background, waiting for a
  240. process to become current, and ready to execute. While TSRPROC is
  241. running in the background, you can use your system for other tasks, such
  242. as editing files, doing spreadsheets, whatever you need to work on. When
  243. the date and time on a process matches the system date and time, it
  244. "becomes current," which means that it is time to invoke that process.
  245. If you are working in some other application when a process becomes
  246. current, TSRPROC will not try to run it. You have the option of
  247. indicating if TSRPROC should try again when you are done. TSRPROC will
  248. only try to run a process if you are at the DOS command prompt.
  249.  
  250.     To use TSRPROC, execute it once at the command line, specifying any
  251. command-line options you want. TSRPROC stays in memory, and will invoke
  252. processes as they become current, but only if you are at a DOS prompt,
  253. never interrupting your current task.
  254.  
  255. When TSRPROC is resident, you can use Alt-LeftShift to display the list of
  256. waiting processes.
  257.  
  258. Command-line options
  259. --------------------
  260.  
  261.     These are the command-line options available with TSRPROC. They may be
  262. selected using either a dash (as in "-h") or a slash (as in "/h"):
  263.  
  264.         -h     Display Help. This shows each command-line option and gives
  265.                a brief description. TSRPROC does not stay in memory after
  266.                displaying help, and does not do any processing.
  267.  
  268.         -u     Unload the resident TSRPROC. By invoking TSRPROC with this
  269.                option, no processing takes place, and the TSRPROC that was
  270.                already loaded is unloaded from memory.
  271.  
  272.         -p     Past processes. When you select this flag, TSRPROC will run
  273.                processes that have a date and time stamp prior to the
  274.                current time before beginning normal processing.
  275.  
  276.         -cxx   Check-wait. TSRPROC checks the system time every 5 seconds,
  277.                by default, to see if any processes are current. This ensures
  278.                that any process will be executed within 5 seconds after it
  279.                becomes current. Use this option to change the frequency with
  280.                which TSRPROC checks the system time. Making the time too
  281.                short may degrade system perform. Making the time longer than
  282.                60 seconds will mean that your processes may start a minute
  283.                or two late. The number of seconds 'xx' is the length of
  284.                time TSRPROC waits between attempts.
  285.  
  286.         -r     Retry. If TSRPROC checks to see if a process can be run, and
  287.                you are in an application, the process will not be run. By
  288.                using this option, you tell TSRPROC to try again, until the
  289.                process can execute.
  290.  
  291.         -d     Debug. If you have problems with TSRPROC, try to reproduce
  292.                the problem. When you run TSRPROC to reproduce the problem,
  293.                specify this option, and also re-direct the output of TSRPROC
  294.                to the printer, if you have one. Don't try to re-direct
  295.                output to a file, as this can cause problems. This is how to
  296.                enter the TSRPROC command with this option:
  297.  
  298.                    TSRPROC -d >prn
  299.  
  300.         -t     Test mode. This displays processes only and does not try to
  301.                invoke them.
  302.  
  303.  
  304. Utility programs
  305. ----------------
  306.  
  307. DOW
  308.  
  309.     This is the Day-Of-Week program. This small program's purpose is to
  310. return the day of the week in the DOS error code. This error code can then
  311. be used in batch files for determining the day of the week. The codes
  312. returned are 0-6 for Sunday through Saturday. The file CDAYBACK.BAT (included
  313. with EVENTMAN) is an example of how to use DOW. It shows a single process
  314. that is to be run every day but one day of the week.
  315.  
  316. Listing of CDAYBACK.BAT:
  317.  
  318.      : CBACKUP.COM is a program that I use for backing-up to tape. CBACKUP.BAT
  319.      : is included instead of the .COM file, for the purpose of the
  320.      : demonstration.
  321.      
  322.      echo off
  323.      dow
  324.      if errorlevel 6 goto saturday
  325.      if errorlevel 5 goto friday
  326.      if errorlevel 4 goto thursday
  327.      if errorlevel 3 goto wednesday
  328.      if errorlevel 2 goto tuesday
  329.      if errorlevel 1 goto monday
  330.      if errorlevel 0 goto sunday
  331.      goto exit
  332.      :sunday
  333.      echo Today is Sunday - Don't do a backup
  334.      goto exit
  335.      :monday
  336.      echo Today is Monday - Do a backup
  337.      cbackup
  338.      goto exit
  339.      :tuesday
  340.      echo Today is Tuesday - Do a backup
  341.      cbackup
  342.      goto exit
  343.      :wednesday
  344.      echo Today is Wednesday - Do a backup
  345.      cbackup
  346.      goto exit
  347.      :thursday
  348.      echo Today is Thursday - Do a backup
  349.      cbackup
  350.      goto exit
  351.      :friday
  352.      echo Today is Friday - Do a backup
  353.      cbackup
  354.      goto exit
  355.      :saturday
  356.      echo Today is Saturday - Do a backup
  357.      cbackup
  358.      goto exit
  359.      :exit
  360.      exit
  361.      echo Procedure cbackup complete.
  362.  
  363.  
  364.  
  365.     CBACKUP.COM, executed by CDAYBACK.BAT, is a program that was created with
  366. the tape backup software that is supplied with the Identity Tape Drive.
  367. CBACKUP.BAT is supplied in lieu of the .COM file in the EVENTMAN package, so
  368. that you can see how it would work. You will create your own backup program,
  369. since this is dependent on the hardware and software that you own.
  370.  
  371. DTIME
  372.  
  373.     This is the Display TIME program. It displays the current date and time
  374. in a readable format. It is used in an event to display the current date and
  375. time. (See the sample event DISPTIME.) Processes can then invoke this event
  376. at the beginning and end of a process, to indicate processing time
  377. information.
  378.  
  379. EVENTMAN Examples
  380. -----------------
  381.  
  382.  
  383. Unattended Hard Drive Backup 
  384.  
  385.     See the example event BACKUP. It executes a batch file (CDAYBACK.BAT)
  386. which invokes a backup program that comes with the particular tape backup
  387. that I use. You will need to change it to use whatever software you have
  388. available with your drive.
  389.  
  390.  
  391. Signing on to a BBS using Kermit
  392.  
  393.     In order to automatically sign on to a BBS and retrieve messsages or
  394. files, you will need Kermit or some other programmable terminal program. A
  395. sample is included with EVENTMAN that signs on to a local BBS and retrieves
  396. un-read messages from a certain section of the BBS. You will need to have
  397. KERMIT in order to use this event in a process. Also, since all BBS's have
  398. different signon procedures, you will need to tailor AUTOLOG.KRM to work on
  399. your favorite BBS. AUTOLOG.KRM is the Kermit script which dials and logs on to
  400. the BBS. AUTOLOG.KRM is designed to work with a Hayes-compatible modem. Start
  401. with the event KERMIT, and follow the code from there, to see how the process
  402. works.
  403.  
  404.  
  405. Handling Daylight Savings time
  406.  
  407.     See the event SPRG_AHD. It is used to set the date ahead on a specific date.
  408.