home *** CD-ROM | disk | FTP | other *** search
/ HomeWare 14 / HOMEWARE14.bin / prog / fdate80a.arj / ALARM.DOC < prev    next >
Text File  |  1993-07-20  |  3KB  |  63 lines

  1.  
  2. DEMONSTRATION BATCH FILE: ALARM
  3. ===============================
  4.  
  5. ALARM.BAT is like a simple alarm clock for your PC.  ALARM.BAT waits
  6. until a specified time, then triggers an alarm: it beeps and displays a
  7. message.  It continues until someone presses CONTROL-BREAK.
  8.  
  9. If you enter just "ALARM" at the DOS prompt, without any parameters,
  10. ALARM displays a HELP screen that shows how to use it.
  11.  
  12. ALARM uses ANSI control codes to control screen color and cursor
  13. placement, so it requires ANSI.SYS in order to work properly.
  14. If you are not using ANSI.SYS, it will display some garbage
  15. characters on your screen unless you modify the batch file to remove
  16. the ANSI control codes.
  17.  
  18.  USAGE   : ALARM                      shows current time in hhmm format
  19.  USAGE   : ALARM hhmm [msg]           waits until hhmm, then sounds an alarm
  20.  
  21.  EXAMPLE : ALARM 0930                 [sounds alarm at 9:30 am]
  22.  EXAMPLE : ALARM 930 Staff meeting    [sounds alarm at 9:30 am]
  23.  EXAMPLE : ALARM 1800                 [sounds alarm at 6:00 pm]
  24.  
  25.            For midnight, specify 0000 or 2400 for hhmm.
  26.  EXAMPLE : ALARM 2400  START MIDNIGHT BATCH RUN
  27.  
  28. The first thing that ALARM.BAT does is to change to the M: drive.  M:
  29. is presumed to be a RAM disk.   Before you can use ALARM.BAT, you
  30. should use your favorite text editor to change the RAM disk designation
  31. to point to your own RAM disk.  It is possible to run ALARM.BAT from a
  32. normal hard disk or floppy, but because ALARM.BAT does a LOT of disk
  33. activity, it is strongly recommended that you make your current
  34. directory a RAM disk before running it.
  35.  
  36. To prevent repeated disk accesses to find the FDATE program, you
  37. should also have FDATE on the RAM disk, or be using a cache.
  38.  
  39.  
  40. USING ALARM TO CREATE RUN-IT
  41. ============================
  42.  
  43. You can copy ALARM.BAT to another batch file (say, RUN-IT.BAT) and
  44. modify it so that rather than sounding an alarm it triggers other
  45. activiites instead: runs a program or programs, or chains to another
  46. batch file, for example.
  47.  
  48. To create a generalized RUN-IT.BAT, you could use the words of the
  49. message to pass in the name of a batch file that you want to be run at
  50. a certain time, along with its parameters.  Make the triggered activity
  51. this:
  52.  
  53.     rem Note that earlier SHIFT has moved batch file name to parm 1.
  54.     rem run %1 batch file.
  55.     %1 %2 %3 %4 %5 %6 %7 %8 %9
  56.  
  57. Then entering this at the DOS prompt:
  58.  
  59.     RUN-IT 0001 BACKUP.BAT C: D: E:
  60.  
  61. would cause RUN-IT to wait until 1 minute past midnight, then
  62. run a batch file called BACKUP.BAT to backup drives C:, D:, and E:.
  63.