home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / unisch1a.zip / UNISCHED.ENG < prev    next >
Text File  |  1999-06-25  |  125KB  |  2,530 lines

  1.                 U N I S C H E D   -   The Universal Scheduler
  2.                 ---------------------------------------------
  3.                                 Version 1.0a GA
  4.                           (C) 1996-99 by Tobias Ernst
  5.  
  6.        (A German Documentation can be found in the file UNISCHED.GER).
  7.  
  8.  
  9. CONTENTS
  10. --------
  11.  
  12. 1.     What is Unisched?
  13.  
  14. 2.     What do I need Unisched for?
  15.  
  16. 3.     Unisched Step by Step
  17. 3.1    Before the Installation
  18. 3.1.1  The TZ Environment Variable
  19. 3.1.2  Unpacking the Distribution Archive
  20. 3.2    Description of the Configuration File Syntax
  21. 3.3    Events und Actions
  22. 3.3.1  Actions
  23. 3.3.2  Recursions
  24. 3.3.3  Events
  25. 3.4    Using Unisched (invocation, user interface)
  26.  
  27. 4.     Advanced UniSched Usage
  28. 4.1    Online Tossing
  29. 4.2    Selective suppression of log file messages
  30. 4.3    Delayed reaction on semaphore files
  31.  
  32. 5.     Shareware
  33.  
  34. 6.     Miscellaneous
  35.  
  36.  
  37. 1. WHAT IS UNISCHED?
  38. --------------------
  39.  
  40. Unisched  is  a  fully  year  2000  compliant scheduler software that has been
  41. designed with special consideration of the needs of a Fidonet node system.  To
  42. cut it short:  Unisched  can  react  to  various  kinds of events with various
  43. actions.  Possible events are:
  44.  
  45. - time controlled events (for example:  every day at 15:00, every 1. each
  46.   month at 10:00, every 30 minutes, ...)
  47. - the creation of sempahore files / flag files by other programs
  48. - new mail has been received in the mailer's inbound directory
  49. - a function key has been pressed at the Unisched console
  50.  
  51. Possible actions are:
  52.  
  53. - An external program, batch file, script, Workplace Shell object can be
  54.   startet.
  55. - Unisched can exit with a certian error level.
  56. - Unisched can modify a Binkley style static outbound (create a poll,
  57.   change the flavour of a mail packet, ...)
  58. - Others (like playing music, creating flag files, deleting flag files, ...)
  59.  
  60. Unisched is intended to be a powerful program built around a simple and easily
  61. intelligible concept.  In order  to  fully understand the event-action concept
  62. of Unisched, I suggest that you carefully read the documentation, but at least
  63. you should read section 3.3.  Unisched is not like other  schedulers,  so  you
  64. will surely profit from reading the docs :-).
  65.  
  66. Unisched  is available as a 16 bit DOS executable (which is multitasking aware
  67. and has  been  successfully  tested  unter  plain  DOS,  DESQview, Windows 95,
  68. Windows NT  and  OS/2)  and  of  course  as  32  bit  native  OS/2  executable
  69. (UNISCHE2.EXE).  If you use the DOS executable, SHARE.EXE or a similar support
  70. for file locking MUST be active!
  71.  
  72.  
  73. 2. WHAT DO I NEED UNISCHED FOR?
  74. -------------------------------
  75.  
  76. The  possible fields of application of Unisched are diverse, and it surely can
  77. be useful even for  non-Fidonet  specific  purpose.  However, I have primarily
  78. written it to be a frontend for a seperate  tosser  task  of  a  Fidonet  node
  79. system, and this is where Unisched's strengths play at their best.
  80.  
  81. Instead  of  having  to  fiddle  around in mailer batch files and mailer event
  82. files, the node can have  a  separate  independent  tosser  task (be it a task
  83. under a multi tasking operating systems, or a separate DOS computer in a local
  84. area network).  Unisched is being active 24/7.  At certain times it starts the
  85. tosser to let it export mail that has been written  locally  or  in  the  BBS.
  86. Every  time  the  mailer  receives  mail, Unisched sees it (either because the
  87. mailer has created a semaphore  file  indicating that mails has been received,
  88. or because Unisched has poked directly in the inbound  directory)  and  starts
  89. the  tosser  to  let  it import the mail.  If the sysop ever feels the need to
  90. manually start the tosser, he simply  presses a function key in Unisched which
  91. is associated to the same action as the event that  automatically  starts  the
  92. tosser.  Every morning at seven o'clock, Unisched plays a little wake-up tune,
  93. and, and, and ....
  94.  
  95. The  advantage  of this approach is obvious:  If you start the tosser directly
  96. from the mailer batch, on a  multiline  system,  you always must take the risk
  97. that two tossers are running parallel.  Also, if you start the tosser from the
  98. mailer batch, the result is that the mailer is not  available  while  you  are
  99. tossing.   These are two strong reasons why you want to have a separate tosser
  100. task.
  101.  
  102. Unisched separates what should have been separated in  the  first  place:  The
  103. mailer  exclusively  serves  the  modems,  and Unisched does the rest.  In the
  104. mailer event file, you only  need  to  define  two events, namedly ZMH and the
  105. rest of the day, so that the mailer does not have to do enything  except  what
  106. it has been designed for: to exchange mail. :-)
  107.  
  108.  
  109. 3. UNISCHED STEP BY STEP
  110. ------------------------
  111.  
  112.   3.1. BEFORE THE INSTALLATION
  113.   ----------------------------
  114.  
  115.     3.1.1 The TZ Environment Variable
  116.     ---------------------------------
  117.  
  118.     Unisched uses  the  TZ  environment  variable,  which contains information
  119.     about the time zone that you live in.  It is not strictly  necessary,  but
  120.     it  prevents  ugly  side  effects  when  you turn the clock from summer to
  121.     winter time and vice versa.
  122.  
  123.     I don't want to bore you at this point, so I simply  tell  you  the  right
  124.     values   for  the  variable.   (Unfortunately,  the  contents  of  it  are
  125.     absolutely non-intuitive  and  also  non-trivial).   The terminus "Summer"
  126.     refers to daylight saving time.
  127.  
  128.     Continental Europe:            SET TZ=MEZ-1
  129.     Continental Europe, Summer:    SET TZ=MEZ-2MSZ
  130.  
  131.     Greenwich Mean Time:           SET TZ=GMT
  132.     Greenwich Mean Time, Summer:   SET TZ=GMT-1GST
  133.  
  134.     Eastern Standard Time:         SET TZ=EST5
  135.     Eastern Standard Time, Summer: SET TZ=EST4EDT
  136.  
  137.     Pacific Standard Time:         SET TZ=PST8
  138.     Pacific Standard Time, Summer: SET TZ=PST7PDT
  139.  
  140.     Other programs also  use  the  TZ  variable  (for  example the tosser when
  141.     generating Via lines), so it can't do any harm  to  set  these  values  in
  142.     autoexec.bat  (DOS)  resp.   Config.Sys  (OS/2) and to reboot the computer
  143.     afterwards.
  144.  
  145.     When you change your clock  from  daylight  savings to normal time or vice
  146.     versa, you should stop  Unisched,  change  the  TZ  variable,  reboot  (if
  147.     necessary),  and  restart  Unisched.   Otherwise you risk that some events
  148.     might be executed multiple  times.   (Of  course  this normally is not too
  149.     serious a problem).
  150.  
  151.     There also is a POSIX  specification  for  the  TZ variable, and there are
  152.     several programs floating  around  that  calculated  TZ  variable  strings
  153.     according to the POSIX standard.  The advantage of these variables is that
  154.     you  do  not  have to change them when you switch from daylight savings to
  155.     normal time and vice versa.  The problem is that Unisched does not support
  156.     this standard, and quite  some  other  programs,  like Fastecho, do not as
  157.     well.  This is not a fault of Unisched or Fastecho, but it is a  fault  of
  158.     the  compilers  that  have been used to compile these programs.  While IBM
  159.     VAC++ and EMX GCC support the POSIX standard, other compilers like Borland
  160.     C do not.
  161.  
  162.  
  163.     3.1.2 Unpacking the Distribution Archive
  164.     ----------------------------------------
  165.  
  166.     The original distribution archive is ZIP compressed.  If you are  an  OS/2
  167.     user,  you  should  uncompress  the  file with the OS/2 version of Infozip
  168.     UNZIP or with the OS/2 version  of  PKZIP 2.50.  If you use other programs
  169.     to unzip  the  archive,  the  extended  attributes  of  UNISCHE2.EXE  will
  170.     probably be lost, so that UNISCHE2.EXE will not have an icon associated.
  171.  
  172.  
  173.  
  174.   3.2. DESCRIPTION OF THE CONFIGURATION FILE SYNTAX
  175.   -------------------------------------------------
  176.  
  177.   Normally  Unisched  is  not case sensitive, i.E. you may either use UPPER or
  178.   lower case or even MiXeD spelling.
  179.  
  180.   Before  we  start  to explain the underlying concept of EVENT and ACTION, we
  181.   have to preconfigure Unisched with  things  like path names etc.  Therefore,
  182.   this section contains a description  of  all  valid  keywords  in  the  file
  183.   UNISCHED.CFG.   If you are bored by this, you can skip this section, but you
  184.   should definitely resume reading at section 3.3.
  185.  
  186.   UNISCHED.CFG is divided into  two  parts.   The  first part contains general
  187.   settings and will be described in this section.  The  second  part  contains
  188.   the  EVENT and ACTION configuration, which will be described in section 3.3.
  189.   The order of the commands inside the  config file is more or less irrelevant
  190.   (with some notable exceptions like Logfile and SemaDir).
  191.  
  192.   Inside the configuration file, you may use  %ENVIRONMENT%  variables.   This
  193.   means  that  the  string  %VARIABLE%  will  be  replaced by the value of the
  194.   environement varalbe named VARIABLE.  If for some reason you want to print a
  195.   single "%" sign in the configuration file,  you have to double it like this:
  196.   "%%".
  197.  
  198.   A  semicolon  ";",  which is either in the first column of the configuration
  199.   file or is preceded by a whitespace character is treated as the beginning of
  200.   a commentary which last until the  end  of the respective line.
  201.  
  202.   Now for the keywords that can  be  used.   In this section and the following
  203.   ones, [ square brackets ] enclose parameters that are optional, the  |  pipe
  204.   character  separates  parameters  that are mutually exclusive, and  <pointed
  205.   brackets> enclose textual placeholders  for  values  that you should insert.
  206.   All other special characters should be typed verbatim.
  207.  
  208.  
  209.    Alivetime = <minutes>
  210.    ---------------------
  211.  
  212.    On  startup,  Unisched  creates the file "UNISCHED.BSY", which will only be
  213.    deleted  when  Unisched   exists   regularly.   The  "Alivetime"  parameter
  214.    configures how often the time stamp of this file should  be  updated  (i.E.
  215.    how  often  the  file  should  be  "touched").   If  you do not specify the
  216.    "Alivetime" paramter, UNISCHED.BSY will never be touched except on startup.
  217.  
  218.    Please note that setting  Alivetime  will  render any powersaving modes for
  219.    your harddisk inoperative.
  220.  
  221.    Example:
  222.    Alivetime = 1
  223.  
  224.  
  225.  
  226.    Autofail = On | Off
  227.    -------------------
  228.  
  229.    If a critical error occurs (like disk  not  ready,  sharing  violation,  et
  230.    cetara),  normally, your OS operating system would prompt you with an error
  231.    message ("Retry, Abort, Fail" under  DOS,  a  dialog box on OS/2).  Because
  232.    this is not what you want when running Unisched unattended --- after all it
  233.    would stop the execution of any actions until until you go to  the  console
  234.    and  confirm  the  dialog  box  ---  Unisched  by default installs an error
  235.    handler that disables these  error  messages  or  dialog boxes, and set the
  236.    default  action  to  "Fail"  (i.E. Unisched will get an error code from the
  237.    OS and will know how to deal with it).
  238.  
  239.    If for any reason you want or need to disable the error  handler,  you  can
  240.    set "Autofail = Off" in your Unisched config file.
  241.  
  242.    Note that on OS/2, the error handler is only valid for Unisched itself, e.g.
  243.    if a process that is spawned by Unisched has a critical error, but does not
  244.    have  an  error  handler  of  its  own,  you will again get the dialog box.
  245.    Therefore, on OS/2 it is always a  good idea to put "AUTOFAIL=YES" into the
  246.    CONFIG.SYS file if you want to run unattended.
  247.  
  248.    Bsp:
  249.    Autofail = On
  250.  
  251.  
  252.  
  253.    Clock = On | Off
  254.    ----------------
  255.  
  256.    This specifies if the title bar of Unisched should contain a digital  clock
  257.    or not.  Per default, the clock is enabled, but if you disable it, you will
  258.    save a little more CPU power ...
  259.  
  260.    Example:
  261.    Clock = Off
  262.  
  263.  
  264.    DiskLog = <Loglevels>
  265.    ---------------------
  266.  
  267.    This parameter tells what sorts  of  messages  will  be logged into the log
  268.    file on disk (it has nothing to do with the log  window!).   The  following
  269.    loglevels  can  each be turned on by specifying their identifying character
  270.    as parameter:
  271.  
  272.        standard status messages (not configurable)
  273.    ?   error messages and warnings (not configurable)
  274.    *   semaphore events      \
  275.    .   function key events    \  all these are triggers for actions that
  276.    ~   periodic events        /  Unisched performs
  277.    #   static events         /
  278.    +   actions (that what is triggered by events)
  279.    -   some debug messages (only in wide beta versions)
  280.    p   messages of the action definition parser
  281.    _   an empty line aftereach event-action block (it improves readability
  282.        if there is lot of logging output).
  283.  
  284.    Example:
  285.    DiskLog = !?*.~#+-
  286.  
  287.  
  288.    ExcessiveSlicing = <number> | Yes | No
  289.    --------------------------------------
  290.  
  291.    This  switch  pertains to timeslice releasing in multi tasking environments,
  292.    i.E. you can configure how  cooperative  Unisched behaves.  If the parameter
  293.    to ExcessiveSlicing is a number not equal  to  zero,  a  significant  higher
  294.    amount  of timeslices is released than otherwise.  "Yes" is another word for
  295.    "5", No for "0".  If you should  set  ExcessiveSlicing to Yes or to No or to
  296.    another number strongly depends on your system configuration.   The  general
  297.    rule  for  testing  which  number  fits  best  is:   It should be as high as
  298.    possible, but the clock in  the  upper  right  corner should still show each
  299.    second separately.
  300.  
  301.    The following values have proven good results:
  302.  
  303.      OS/2 native:    0
  304.      OS/2 DOS box:   1 or 0
  305.      Windows NT:     20
  306.      Windows 95:     0, maybe a little more
  307.  
  308.  
  309.    FlushLog = Yes | No
  310.    -------------------
  311.  
  312.    If FlushLog is set to Yes (default), Unisched forces the  operating  system
  313.    to  write  its log file on disk as soon as Unisched is idle, by closing the
  314.    file and repening it.  The advantage of this is that if the system crashes,
  315.    the log file will be  up  to  date  until  the point of the crash.  Another
  316.    advantage is that you can view the Unisched log file with a log file viewer
  317.    while Unisched is running.
  318.  
  319.    If you don't want Unisched to close and reopen the log file  when  it  gets
  320.    idle (I don't know any reasons though), you can set "FlushLog = No".
  321.  
  322.  
  323.  
  324.    IgnoreOldBusyFlag = <minutes>
  325.    -----------------------------
  326.  
  327.    Besides  flow  files,  which contain references to the files that are to be
  328.    sent to your links, the Binkley  outbound  can also contain a .BSY file for
  329.    each node, which serves for access serialization:  While  a  .BSY  file  is
  330.    present,  no other programs (except for the one that created the .BSY file)
  331.    may modify the flowfile of the respective node.
  332.  
  333.    Unisched recognises .BSY files:   When  a  .BSY  file  is  found,  Unisched
  334.    postpones  the  action that it intends to make on the Binkley outbound, and
  335.    periodically tests if the .BSY  file  still exists, and performs the action
  336.    as soon as the .BSY file has vanished (then creating a .BSY file for itself
  337.    while modifying the outbound, of course).
  338.  
  339.    Sometimes, though, the Binkley outbound contains  .BSY  files  that  result
  340.    from  programs  that  have  been stopped the hard way (kill or lockup).  If
  341.    terminated irrgularly, those  programs  can't  delete  their .BSY files, so
  342.    these .BSY files are now orphan.  The result:  No new files can be sent  to
  343.    the  outbound for eternity, because there is no one left to delete the .BSY
  344.    file.
  345.  
  346.    Unisched  tries  to  detect  this  situation.   If a .BSY file that hinders
  347.    Unisched in doing something  in  the  outbound  is  older than three hours,
  348.    Unisched assumes that it is orphaned and deletes the .BSY file.
  349.  
  350.    If you want to change the deafult value of three hours, you  can  configure
  351.    it  with  the "IgnoreOldBusyFlag" keyword.  The argument is assumed to be a
  352.    value in minutes, so the default value of three hours would be expressed as
  353.    "180".  If you set the argument to  0, the feature will be tunred off, e.g.
  354.    orphaned .BSY files will never be force-deleted, but will  block  the  link
  355.    until the sysop manually removes them.
  356.  
  357.    Example:
  358.    IgnoreOldBusyFlag = 90
  359.  
  360.  
  361.    IgnoreOldBusySem = <minutes>
  362.    ----------------------------
  363.  
  364.    A similar mechanism like for  orphaned  .BSY  files in the binkley outbound
  365.    also exists for the UNISCHED.BSY  file,  a  semaphore  which  indicates  if
  366.    Unisched  is  running  or  not.   If,  on  startup,  Unisched sees the file
  367.    UNISCHED.BSY, it assumes that another Unisched task is already running, and
  368.    does not start itself.
  369.  
  370.    If  you  use "IgnoreOldBusySem", Unisched tests the age of UNISCHED.BSY (if
  371.    found), and if it is older than the specified number of minutes, it removes
  372.    the file, recreates it, and starts up,  because it assumes that the file is
  373.    orphaned.
  374.  
  375.    Please do  note  that  you  MUST  use  AliveTime  (see  above)  if  you use
  376.    IgnoreOldBusyTime  in  order  for  the   timestamp   UNISCHED.BSY   to   be
  377.    continuously updated as long as Unisched is not dead, but running.
  378.  
  379.    Which numbers to choose  for  AliveTime  and IgnoreOldBusySem depend on the
  380.    configuration of Unisched.  If you  start  all  external  programs  in  the
  381.    background  (e.g. with EXEC START or START under OS/2), Unisched will never
  382.    be inactive (but running) for more  than  a few seconds.  You can use small
  383.    values in this case:
  384.  
  385.    AliveTime = 1
  386.    IgnoreOldBusySem = 5
  387.  
  388.    If, however, you start any lengthy  task  in  the  foreground  (e.g.   EXEC
  389.    TOSS.BAT), Unisched could be inactive (though not dead) for quite long time
  390.    spans,  and  you  should  set  the IngoreOldBusySem timeout value to a high
  391.    value.  A tossing task (e.g.  system  organization)  can easily take one or
  392.    more hours:
  393.  
  394.    AliveTime = 10
  395.    IgnoreOldBusySem = 180
  396.  
  397.    No matter how you do it, you  should  -  to help your system to continue to
  398.    work even if you are away - start Unisched from a simple  batch  file  that
  399.    restarts  Unisched  if it exits because of a busy sempahore file.  Unisched
  400.    exits with error level  255  in  this  case.  However, Unisched sleeps some
  401.    seconds before exiting, so that even if  the  batch  continuously  respawns
  402.    Unisched  for quite some time, it will not suck of too much processor load,
  403.    and finally (if the .BSY  file  has  vanished or is expired), Unisched will
  404.    start up.
  405.  
  406.    :start
  407.    unische2 /cunisched.cfg
  408.    if errorlevel 255 goto start
  409.  
  410.  
  411.  
  412.    Include = <path+filename>
  413.    -------------------------
  414.  
  415.    Use this to include additioal configuration file at the current position.
  416.  
  417.    Example:
  418.    Include = e:\configs\colors.cfg
  419.  
  420.  
  421.  
  422.    KeyColumns = <cols>
  423.    -------------------
  424.  
  425.    This keyword sets the number of columns that  are  used  for  printing  the
  426.    function  key  descriptions  in the upper half of the Unisched window.  The
  427.    default is 4, but if  you  use  small  window  sizes or longer event names,
  428.    using only three columns might improve readability.
  429.  
  430.    Example:
  431.    KeyColumns = 3
  432.  
  433.  
  434.  
  435.    Logfile = <path+filename>
  436.    -------------------------
  437.  
  438.    This keyword should be the very  first  line in the configuration file.  It
  439.    specifies the location and filename of the log file.
  440.  
  441.    Example:
  442.    Logfile = e:\box\log\unisched.log
  443.  
  444.    If for whatever reason you  are  running  multiple  instances  of  Unisched
  445.    simultaneously, each one must use its own log file.
  446.  
  447.  
  448.  
  449.    MTask = <multitasker>
  450.    ---------------------
  451.  
  452.    Unisched is extremely multitasking friendly.  Even the DOS version is  able
  453.    to  recognise  a  huge bunch of common multitaskers and release time slices
  454.    accordingly in order to use  as  few  processor time as possible.  Unisched
  455.    normally autodetects the multitasker in use (it is printed on startup).  If
  456.    Unisched does not detect the multitasker that you are using  (this  happens
  457.    e.g.  for  Topview),  you  can  hard-wire  it using the MTask keyword.  The
  458.    following arguments can be given for <multitasker>:
  459.  
  460.      Argument    Meaning
  461.      --------    --------
  462.      DESQview    Quarterdeck DESQview
  463.      PC-MOS      PC-MOS
  464.      Windows     Windows 3.1, 95 und NT (actually, the DPMI time slice)
  465.      DoubleDOS   DoubleDOS
  466.      OS/2        Why don't you use UNISCHE2.EXE instead? ;-)
  467.      TopView     TopView
  468.      Multilink   Multilink
  469.      BIOS        Timeslicing via BIOS calls. Better than nothing, at least.
  470.                  It is said to be useful under Netware.
  471.      Generic     Timeslicing via the multiplexer interrupt. Better than
  472.                  nothing, at least.
  473.      None        Completely disables time slicing.
  474.  
  475.    Also notice the corresponding  setting  of the "ExcessiveSlicing" parameter
  476.    (see above).
  477.  
  478.  
  479.  
  480.    Outbound = <path>
  481.    -----------------
  482.  
  483.    This keyword configures the base path of the static Binkley style mail/file
  484.    outbound.   It  is required for the POLL, SEND, and other actions.  Even if
  485.    you are not running a Fidonet node  system, you must set this keyword.  You
  486.    can point it to an empty or non-existing directory, of course, as  long  as
  487.    you don't use special Fidonet actions.
  488.  
  489.    Example:
  490.    Outbound = e:\box\binkley\outbound
  491.  
  492.    The outbound directories for other zones (like outbound.0f2 etc.) are being
  493.    automatically  calculated  by  Unisched.  If, however, you are using a full
  494.    domain setup (for example  zone  242,  fido.de,  would result in fidode.0f2
  495.    instead of outbound.0f2),  you  need  to  configure  each  domain  outbound
  496.    directory as shown below.
  497.  
  498.  
  499.    <zone number> = <outbound base name>
  500.    ------------------------------------
  501.  
  502.    This is the domain setup.  You need it if your mailer uses  a  full  domain
  503.    setup, where e.g. files for zone 242 are not stored in outbound.0f2, but in
  504.    fidode.0f2.   (This  is the Binkley domain setup, other mailers like McMail
  505.    do not change the outbound  directory  names  even if you do configure them
  506.    for domains).  Important:  The <outbound base name> parameter specifies the
  507.    physical base path name of the outbound directory, but not the real  domain
  508.    name.   Also  imporant:  The zone number must be specified decimally.  Some
  509.    examples:
  510.  
  511.    zone number     domain name:    outbound path
  512.    1               fidonet         e:\inout\outbound.001
  513.    2               fidonet         e:\inout\outbound
  514.    ...
  515.    6               fidonet         e:\inout\outbound.006
  516.    9               virnet          e:\inout\virnet.009
  517.    242             fido.de         e:\inout\fidode.0f2
  518.  
  519.    If you have a configuration like above, you would have to configure  it  in
  520.    Unisched as follows:
  521.  
  522.    Zone = 2
  523.    Outbound=e:\inout\outbound
  524.    9   = Virnet
  525.    242 = FIDODE
  526.  
  527.    You see: fidode (NOT fido.de), but 242 (NOT 0f2)
  528.  
  529.  
  530.  
  531.    Pipe = <pipe name>
  532.    ------------------
  533.  
  534.    This  makes  Unisched write its log messages into a named pipe (in addition
  535.    to the log file).  You can read  the  message  from the pipe on the same or
  536.    (which is the main application of this feature) on a different  machine  on
  537.    the  network with programs like PMPIPER, PIPEMAN, RXSNOOP and others.  This
  538.    feature is often used to  monitor  Unisched  which  is running on a distant
  539.    server from a client in the network. Example:
  540.  
  541.    Pipe = \\pipe\unisched
  542.  
  543.    Unisched supports reconnects for pipes, which means that you do not need to
  544.    restart Unisched after the pipe has been terminated by the client.
  545.  
  546.    You should only configure a pipe if you intend to use it, because otherwise
  547.    it slows down the startup of Unisched unnecessarily.
  548.  
  549.  
  550.  
  551.    PipeLog = <Loglevels>
  552.    -----------------------
  553.  
  554.    Here you can specify what sort of messages should be visible in  the  named
  555.    pipe.  The syntax is the same as for the "DiskLog" keyword (see above).
  556.  
  557.  
  558.  
  559.    RecentActivityLines = <n>
  560.    -------------------------
  561.  
  562.    This  line  configures how many lines of log messages should be kept in the
  563.    back scroll buffer.  The back scroll buffer stores old log messages for the
  564.    log window, so that you can use PgUp/Dn, Home/End and the  cursor  keys  to
  565.    scroll  through old entries in the log window.  (This is not related to the
  566.    log file in any way).   The  default  value  for  this variable is 100, and
  567.    changing it above 500 can only be recommonded in the OS/2 version.
  568.  
  569.  
  570.  
  571.    ResetDialCounters = Yes | No
  572.    ----------------------------
  573.  
  574.    If you set it to yes, Unisched  will erase all nodial marks, dial counters,
  575.    overtry flags etc. for the node for which it creates a poll.   Do  consider
  576.    carefully  if  you  really want to use this option.  As an alternative, you
  577.    could also use the RDC argument to the POLL action (see below) for selected
  578.    polls.
  579.  
  580.  
  581.  
  582.    RescanSema = <path+filename>
  583.    ----------------------------
  584.  
  585.    When Unisched creates a poll file  (*.?LO)  in the Binkley outbound, it can
  586.    optionally create/touch a flag file that tells the mailer that it has to do
  587.    an outbound rescan.  As the RescanSema argument, you can specify  the  file
  588.    name of such a flag file.
  589.  
  590.    Example (settings for Binkley resp. McMail):
  591.    RescanSema = e:\box\sema\btrescan.flg
  592.    RescanSema = e:\box\sema\mcmscan.all
  593.  
  594.    Some  mailers  support  sempahore  files that are only valid for a specific
  595.    mailer task number (line) that should preferably do the outbound rescan and
  596.    perform the poll.  The line number  is  then normally coded into the rescan
  597.    semaphore file name.  If you have a mailer of this sort, you can  code  the
  598.    line  number  into  the  RescanSema filename argument by specifying C-style
  599.    formatter arguments, the most commonly used of which are listed below:
  600.  
  601.    %d   The line number, in decimal notation.
  602.    %03d The line number, in decimal notation.  If it has less than three
  603.         digits, it is padded with zeros on the left.
  604.    %x   The line number, in hexadecimal notation.
  605.    %02x The line number, in hexadecimal notation.  If it has less than two
  606.         digits, it is padded with zeros on the left.
  607.    etc.
  608.  
  609.    Example (setting for McMail):
  610.    RescanSema = e:\box\sema\mcmscan.%d
  611.  
  612.    The result is that Unisched creates  either mcmscan.1, or mcmscan.2, and so
  613.    on, depending on which line should preferably do the outbound rescan (which
  614.    you can specify as argument to the POLL action, see below).
  615.  
  616.    You can give up to ten different "RescanSema" lines  in  the  configuration
  617.    file.   If  so,  Unisched  will  create all flag files that are configured.
  618.    This is useful  if  you  are  using  different  mailer software parallel or
  619.    sometimes the one mailer and sometimes the other and always  want  Unisched
  620.    to  create all relevant rescan semaphore files.
  621.  
  622.  
  623.  
  624.    Registername = <Name>
  625.    Registerkey = <Key>
  626.    ---------------------
  627.  
  628.    Send me 12 US-$, and I'll tell you what you have to configure here ;-).
  629.  
  630.  
  631.  
  632.    ScreenLog = <Loglevels>
  633.    -----------------------
  634.  
  635.    Here you can specify what sort of messages should be visible in the message
  636.    window.  The syntax is the same as for the "DiskLog" keyword (see above).
  637.  
  638.  
  639.  
  640.    SeeHiddenFiles = Yes | No
  641.    -------------------------
  642.  
  643.    This flag controls if Unisched, when looking for semaphore files and  other
  644.    flag  files  (for  a  detailed  explanation see below), sees "hidden" files
  645.    (files with the "hidden" or  "system"  attribute),  or  if it will only see
  646.    normal files (which is the default setting).
  647.  
  648.  
  649.  
  650.    SemaDir = <pathname>
  651.    --------------------
  652.  
  653.    The <pathname> argument  of  the  SemaDir  keyword  specifies the semaphore
  654.    directory.  This is the directory where signal  files,  usually  with  zero
  655.    length,  are placed by your mailer and other tools.  Note that Unisched can
  656.    look for semaphore files even if  they reside in other places.  The SemaDir
  657.    keyword is only for your convenience:  If you specify a name of a semaphore
  658.    file that is not an absolute path name, Unisched will assume that the  file
  659.    resides  in  the  SemaDir.  So  if  you have to configure lots of semaphore
  660.    files, you will be saved from some  typing work.  -- Semadir only works for
  661.    sempahore  file  names  that  are  specified  AFTER  the  SemaDir  in   the
  662.    configuration file.  Therefore, you should put the SemaDir keyword near the
  663.    beginning of the Unisched configuration file.
  664.  
  665.    Example:
  666.    SemaDir = e:\binkley\flags
  667.  
  668.  
  669.  
  670.    SemaphoreCheckInterval = <seconds>
  671.    ----------------------------------
  672.  
  673.    As  will  be  explained  in detail below, Unisched can trigger actions when
  674.    certain files appear or  disappear,  become  older  than xx hours, etc.  To
  675.    perform this task, Unisched must access the hard disk periodically in order
  676.    to be able to see if anything has changed for  the  files  that  are  being
  677.    surveyed.
  678.  
  679.    With  the  SemaphoreCheckInterval  keyword,  you  can  configure  how often
  680.    Unisched will do this  check.   The  <seconds>  parameter  is  only  to  be
  681.    considered  as  a  gross  guideline.   The  standard  value  is 1 (test for
  682.    semaphore files every second),  granting  that  Unisched  will react to any
  683.    possible changes as often as possible.  The standard value is good as  long
  684.    Unisched  only  checks  files  on a lokal hard disk, as these requests will
  685.    usually be satisfied by some sort of file system cache.
  686.  
  687.    If you let Unisched test for files  that reside on a volume that is mounted
  688.    via LAN, or on volumes that are not being  cached  for  some  reasons  (DOS
  689.    without SmartDrv, for example), it is recommended to raise this value to 10
  690.    seconds  or  higher,  in  order  to  reduce network and/or disk IO bandwith
  691.    usage.
  692.  
  693.    Example:
  694.    SemaphoreCheckInterval = 30    ;test every half minute
  695.  
  696.  
  697.  
  698.    SmallWindow = On | Off
  699.    ----------------------
  700.  
  701.    When SmallWindow = On is  set,  Unisched  will only use 66x18 characters of
  702.    the display window, instead of 80x25.  This is useful  under  DESQview,  if
  703.    you configure a smaller window size.
  704.  
  705.    Under  OS/2  this  parameter  is  deprecated  and useless, because the OS/2
  706.    version is able to  autodetect  the  terminal  window size.  Simply use the
  707.    MODE command before starting Unisched to set an arbitrary window  size  (as
  708.    for  example "MODE CO66,16"), and Unisched will automatically adapt to this
  709.    size when started.
  710.  
  711.    Example:
  712.    SmallWindow = Off
  713.  
  714.  
  715.  
  716.    SpawnInit = $action_name
  717.    ------------------------
  718.  
  719.    The given action will  be  executed  once  at program startup.  Section 3.3
  720.    explains what actions are and how to set them up, so don't  worry  at  this
  721.    point.  Up to 16 SpawnInit actions are possible.
  722.  
  723.    Example:
  724.    SpawnInit = $welcome_song
  725.  
  726.    Hint for OS/2 users:  It won't work to use "SpawnInit = EXEC MODE CO66,18".
  727.    The  reason  for this is that the terminal window detection code on OS/2 is
  728.    executed before the SpawnInit actions, due to a restriction in the compiler
  729.    that I use.  If you want to  change  the VIO terminal window size, you need
  730.    to do it before calling Unisched, probably in a CMD file.
  731.  
  732.  
  733.  
  734.    Zone = <nr>
  735.    -----------
  736.  
  737.    This keyword is used to configure your FTN home zone (Europe:  2, USA:  1),
  738.    i.E. the zone number  for  which  the  outbound  directory  does not have a
  739.    number prefix.  This setting is obligatory, as it  is  needed  for  correct
  740.    determination  of  the  outbound  directory  names.   If  you do not have a
  741.    Binkley outbound or do not want  to  use the POLL and related actions, just
  742.    configure anything, but do configure something.
  743.  
  744.    Example:
  745.    Zone = 2
  746.  
  747.  
  748.  
  749.    ColBorder          = <nr>
  750.    ColKeys            = <nr>
  751.    ColKeyDescriptions = <nr>
  752.    ColHeadLine        = <nr>
  753.    ColEvent           = <nr>
  754.    ColLog             = <nr>
  755.    -------------------------
  756.  
  757.    Use these keywords to configure the color layout of Unisched.  Just try out
  758.    for yourself which parts of the  window  are changed by which keyword.  The
  759.    color numbers (the <nr> parameters) are calculated using
  760.      <nr> = <foreground color> + 16 * <background color>
  761.    where <foreground color> and <background  color>  can  be  taken  from  the
  762.    following table:
  763.  
  764.                 │     │Back-  │Fore-                    │     │Back-  │Fore-
  765.    Color        │Value│ground?│ground?     Color        │Value│ground?│ground?
  766.    ═════════════╪═════╪═══════╪═══════    ══════════════╪═════╪═══════╪═══════
  767.    BLACK        │  0  │ Yes   │ Yes        DARKGRAY     │  8  │ No    │ Yes
  768.    BLUE         │  1  │ Yes   │ Yes        LIGHTBLUE    │  9  │ No    │ Yes
  769.    GREEN        │  2  │ Yes   │ Yes        LIGHTGREEN   │ 10  │ No    │ Yes
  770.    CYAN         │  3  │ Yes   │ Yes        LIGHTCYAN    │ 11  │ No    │ Yes
  771.    RED          │  4  │ Yes   │ Yes        LIGHTRED     │ 12  │ No    │ Yes
  772.    MAGENTA      │  5  │ Yes   │ Yes        LIGHTMAGENTA │ 13  │ No    │ Yes
  773.    BROWN        │  6  │ Yes   │ Yes        YELLOW       │ 14  │ No    │ Yes
  774.    LIGHTGRAY    │  7  │ Yes   │ Yes        WHITE        │ 15  │ No    │ Yes
  775.  
  776.  
  777.    Example:
  778.    Red text on a green background  =  4  +  16  *  2  = 36, so if you wish the
  779.    function key names to be printed in red on green, you would use
  780.    ColKeys = 36
  781.  
  782.  
  783.  
  784.   3.3. EVENTS AND ACTIONS
  785.   -----------------------
  786.  
  787.   3.3.1 ACTIONS
  788.   -------------
  789.  
  790.   As has already been noted, the key concept of Unisched is to react on EVENTS
  791.   with ACTIONS.  Before we will examine what  kind  of  events  are  possible,
  792.   we'll first define the actions that Unisched can execute.
  793.  
  794.   The definition of an action always begins with a $  character,  followed  by
  795.   the name of the action.  The name of the action can be freely chosen by you,
  796.   but may only consist of letters and the underscore.  After this, you type an
  797.   equality  sign  and  then  the  action  description  in  a syntax soon to be
  798.   examined.
  799.  
  800.   Example:
  801.   $CALL_MY_HUB = POLL 2:2476/404 crash 2
  802.  
  803.   The action "CALL_MY_HUB" is defined to execute the Unisched built-in command
  804.   "POLL 2:2476/404 crash 2", whatever that means.
  805.  
  806.   The following section  describes  the  action  syntax  for  all actions that
  807.   Unisched can take, i.E. it describes what you can type  on  the  right  hand
  808.   side of the equality sign in the example above.
  809.  
  810.  
  811.      BEEP [<frequency> [<duration>]]
  812.      -------------------------------
  813.  
  814.      A  simple  beep  is  emitted  by  the  PC  speaker.   You can specify the
  815.      frequency and duration in Hertz resp. milliseconds.  If the paramters are
  816.      omitted, the default is 1000 Hz and 100 ms.
  817.  
  818.      Areas of application:  Alarm clock, an  hourly  beep like when you have a
  819.      digital wrist watch, ...
  820.  
  821.      Examples:
  822.      $LONG_AND_LOUND = BEEP 800 4000
  823.      $SHORT_BEEP = BEEP 1000 80
  824.  
  825.      If you want to make more noise than just a single beep, have  a  look  at
  826.      the  action  "PLAY" in connection with MUS files.
  827.  
  828.  
  829.  
  830.      EXEC <command>
  831.      --------------
  832.  
  833.      Unisched will execute the external  program / command specified.  EXEC is
  834.      the most simple way to start external programs (as compared  to  OPEN  or
  835.      START),  yet  it  is  important  to understand the way how the command is
  836.      executed:  Unisched passes everything after the EXEC keyword verbatim the
  837.      the command interpreter.   Under  DOS,  this  is  usally COMMAND.COM, and
  838.      under OS/2, it is usally CMD.EXE, but  if  you  have  replaced  those  by
  839.      4DOS/4OS2,  those  will  be used instead.  The result is that you can not
  840.      only execute executable programs (EXE,  COM),  but also batch files (BAT,
  841.      CMD) and even built-in commands of the command  interpreter  (like  COPY,
  842.      DIR, ...).  To repeat it again:
  843.  
  844.      > Everything behind the EXEC keyword will be executed exactly like if
  845.      > you would have typed it at a DOS prompt / OS/2 prompt.
  846.  
  847.      Example.:
  848.      $Export_Mail = EXEC e:\box\batch\export.bat
  849.  
  850.      Unisched  will suspend execution until the command that is being executed
  851.      has finished.  OS/2 users might want to use the START action  instead  in
  852.      some  cases, which is (in contrast to EXEC), able to asynchronously start
  853.      external programs, but  it  is  only  available  in  the  OS/2 version of
  854.      Unisched.
  855.  
  856.      Users of the DOS version  that  have  it running under a multitasker like
  857.      Windows 95 might consider to EXEC the START command  of  their  operating
  858.      system  ("EXEC  START  test.bat").   In this case, the START command will
  859.      asynchronously start the  program,  and  then  finish,  so  that EXEC can
  860.      return immediately.
  861.  
  862.  
  863.  
  864.      EXIT <errorlevel>
  865.      -----------------
  866.  
  867.      This action makes Unisched  exit  with  the  given  error level.  This is
  868.      useful if you use a batch file (BAT or CMD) to start Unisched.  The batch
  869.      can take certain actions,  like  executing  programs,  depending  on  the
  870.      errorlevel code that Unisched returns.
  871.  
  872.      The EXIT action is especially useful for DOS users:  When  you  use  EXIT
  873.      and  the  batch  file to start an external program, it will have the full
  874.      RAM area for itself, whereas if you  would use EXEC to start the external
  875.      program, some parts of Unisched would still remain in  memory  while  the
  876.      external  program  is  running.  Using EXIT and a batch file instead will
  877.      yield as much as 60 KB of additional RAM.
  878.  
  879.      Example:
  880.      $START_TOSSER_VIA_BATCH = EXIT 80
  881.  
  882.  
  883.  
  884.      IGNORE
  885.      ------
  886.  
  887.      This  action  simply  does  nothing.   It  might be useful for testing or
  888.      debugging purposes.
  889.  
  890.  
  891.  
  892.      OPEN <OBJECT_ID> and OPEN <PATHNAME>
  893.      ------------------------------------
  894.  
  895.      This command is only available on OS/2 and only if the Workplace Shell is
  896.      installed  (this  is  the default, but some OS/2 users replace the WPS by
  897.      other shells like Filebar of MSHELL).   The OPEN command is being used to
  898.      Open (start) objects that reside on the Workplace Shell, to open files on
  899.      disk using the workplace shell's file<->program association capabilities,
  900.      or to start external programs using the workplace shell.  The action that
  901.      Unisched performs is the same that would happen if you would double click
  902.      on the icon that is associated with the given object ID, or if you  would
  903.      use  the  Drives  folder  and  double  click  on  the  file  specified by
  904.      <PATHNAME>.
  905.  
  906.      The <OBJECTID> parameter deserves special attention.  The Workplace Shell
  907.      can assign Object ID's  to  objects  (icons)  that  live on the workplace
  908.      shell, in order to  uniquely  identify  them  and make them accessible to
  909.      software like Unisched.  Some objects have  predefined  Object  IDs,  for
  910.      example  the  drives  folder  has  the  ID  <WP_DRIVES> (yes, the pointed
  911.      brackets  are part of the object ID in this case), and the desktop itself
  912.      has <WP_DESKTOP>.  Icons  that  you  create  by  using  the "New Program"
  913.      template usually do not have an object ID, but you can  use  third  party
  914.      tools  like  Deskman/2  to assign a unique object ID to arbitary icons on
  915.      your desktop.  You can also  write  simple REXX scripts to create program
  916.      icons that have a special object  ID  (for  an  example,  see  below,  or
  917.      consider   the   REXX   documentation,  with  special  attention  to  the
  918.      "SysSetObjectData" routine).
  919.  
  920.      A useful application of this is to "start icons" with Unisched.   In  the
  921.      default configuration, the WPS will only "start an icon" once, and if you
  922.      try  to  double  click  it  while it is already started, the WPS will not
  923.      start a new instance, but  pop  the  running one in the foreground.  Just
  924.      the same applies if Unisched OPENs icons  using  their  Object  ID.   You
  925.      could create an icon that starts your tosser task and always let Unisched
  926.      open  that  icon  (rather  than  EXECing  or  STARTing  the  tosser batch
  927.      directly).  You can then be  sure  that  never  ever two instances of the
  928.      tosser will run at the same time.
  929.  
  930.      The following REXX script would create an icon on the desktop  that  runs
  931.      the "tosser.cmd" batch file, and assign the object ID "<MYID_TOSSERTASK>"
  932.      to  it.   Save the following lines as the file "test.cmd" (take care that
  933.      the /* are the very first two characters in the file), and run it:
  934.  
  935.        /* REXX */
  936.        call RxFuncAdd 'SysCreateObject', 'RexxUtil', 'SysCreateObject'
  937.        n = SysCreateObject("WPProgram",,
  938.                            "Start the Tosser task",,
  939.                            "<WP_DESKTOP>",,
  940.                            "EXENAME=e:\tools\tosser.cmd;"||,
  941.                            "OBJECTID=<MYID_TOSSERTASK>",,
  942.                            "update")
  943.        exit
  944.  
  945.      You could then use the following Unisched action to start the tosser task:
  946.  
  947.         $Tosser = OPEN <MYID_TOSSERTASK>
  948.  
  949.      Instead of an object ID, you can also specify a file  name  as  argument.
  950.      However, this has to be a fully qualified file name, i.E. it must contain
  951.      the drive letter and  an  absolute  path.   What  will  happen if this is
  952.      executed is the same that would happen  if  you  would  open  the  drives
  953.      folder,  locate the file, and do a double click on it, in accordance with
  954.      all association rules  (object  class,  file  extension,  etc.).  If, for
  955.      example, you would like to play an AVI film, just use something like
  956.  
  957.         $Parrot = OPEN c:\mmos2\movies\macaw.avi
  958.  
  959.  
  960.  
  961.      PLAY <filename.MUS>
  962.      -------------------
  963.  
  964.      Plays a tune using the internal PC speaker.  The tune is  stored  in  the
  965.      given  MUS  file.   A  file  in  the  MUS  format contains human readable
  966.      commands that have  a  syntax  similar,  but  not  identical, to the BEEP
  967.      action:
  968.  
  969.         TONE <frequency> <duration_in_hundreths_of_seconds>
  970.         WAIT <duration_in_hundreths_of_seconds>
  971.  
  972.      The file format is the same file format that is used for sysop page tunes
  973.      by the Proboard BBS software.  You can request an archive  that  contains
  974.      some  example  songs (Startrek themes, e.g.) under the name UAPS10.ARJ at
  975.      my node system (2:2476/418).
  976.  
  977.      The DOS version  will  play  the  MUS  file  in  the foreground, i.E. all
  978.      operation as suspended until the song is played.  The OS/2  version  will
  979.      play  the  songs  in background, i.E. other things can be done, while the
  980.      song is being played. You can use the action ABORTMUSIC to abort playing.
  981.  
  982.      Example:
  983.      $ALARM_CLOCK    = PLAY f:\box\pb\Alarm_Clock.MUS
  984.      $I_AM_AWAKE_NOW = ABORTMUSIC
  985.  
  986.  
  987.  
  988.      PLAY <filename.WAV|.MID>
  989.      ------------------------
  990.  
  991.      This command plays a sound file  in  the  WAV  or MID file format.  It is
  992.      only implemented in the OS/2 version and  will  only  work  if  you  have
  993.      MMPM/2  installed.   The  songs/sounds  will be played in background, but
  994.      cannot be aborted.
  995.  
  996.      Example:
  997.      $Bigben = PLAY f:\sounds\bigben.wav
  998.  
  999.  
  1000.  
  1001.      POLL <node> [<flavour>] [COND] [RDC] [LINE<linenr>]
  1002.      ---------------------------------------------------
  1003.  
  1004.      This action instructs the mailer to poll a node system by creating a .?LO
  1005.      flag  in  the  binkley outbound directory structure.  Also, Unisched will
  1006.      touch or create  the  mailer  rescan  semaphore  after  the poll has been
  1007.      created. The order of the parameters is important.
  1008.  
  1009.      <node>:        node number in 3D or 4D
  1010.      <flavour>:     The following flavours can be used:  "crash", "immediate",
  1011.                     "direct",  "normal",  "hold"  (did  I  say every parameter
  1012.                     makes sense?  <g>), "poll".   Please note that "immediate"
  1013.                     does not work for BinkleyTerm, and "poll" does  only  work
  1014.                     for  McMail  starting  with Gamma 5.  You can also use the
  1015.                     flavours "fl0" ..  "fl9".   This  will create flowfiles of
  1016.                     the syntax "0lo" ..  "9lo".  The idea is a  draft  by  the
  1017.                     Binkley  XE  developers  team for a more detailed priority
  1018.                     scheme in the  Binkley  outbound.   Unfortunately, I don't
  1019.                     know of any software that uses this,  except for  Unisched
  1020.                     ;-).
  1021.      COND:          If you specify the  COND  keyword,  the  poll will only be
  1022.                     generated you have something on hold for  the  destination
  1023.                     node.
  1024.      RDC:           The  "RDC" keyword is short for "reset dial counters".  If
  1025.                     specified, all dial counters,  busy  marks, and other flag
  1026.                     files  for  this  node will be removed before creating the
  1027.                     poll.  The  affected  files  have  the  extensions ".$??",
  1028.                     ".&??", ".#??" and ".-??".  It is recommended that you use
  1029.                     the RDC keyword for at least one poll for  each  node  per
  1030.                     day or at least week (otherwise,  your  system  could  not
  1031.                     dial  the node for days or even weeks because of a stupide
  1032.                     dial counter  mark).   If  you  want  to  specify  the RDC
  1033.                     keyword   for   all   polls,   you    could    also    set
  1034.                     "ResetDialCounters=Yes"  globally instead of using the RDC
  1035.                     keyword for every POLL action.
  1036.  
  1037.      LINE<linenr>:  You can give a number as <linenr> argument that  specifies
  1038.                     the  line  that  should preferably to the poll.  This line
  1039.                     number  is  used  for   filling   the  "%"-macros  in  the
  1040.                     RescanSema file name (see above).  If you  have  used  "%"
  1041.                     macros  in  the  RescanSema  filename,  you  should always
  1042.                     specify a line number  in  your POLL actions.  Please note
  1043.                     that because of the fact that Unisched  creates  a  rescan
  1044.                     semaphore only for this particular line, it is very likely
  1045.                     that  this  line  will  also do the poll, but it cannot be
  1046.                     guaranteed, because by  accident,  another line could also
  1047.                     do a rescan and do the  poll  before  the  line  that  you
  1048.                     intended to use does it.  (The notable exception from this
  1049.                     is  the  flavour  "Poll"  which  is specific to McMail.  A
  1050.                     McMail "Poll" for  a  specific  line  will  make only this
  1051.                     particular line do the poll).
  1052.  
  1053.                     You can give more than  one  LINE<linenr>  statement,  but
  1054.                     additional  LINE statements will only be used for creating
  1055.                     additional line rescan semaphore files.  A McMail Taskpoll
  1056.                     (flavour:  "poll") will only be created for the first line
  1057.                     given.  The highest line number that you can use is 32.
  1058.  
  1059.      Examples:
  1060.      $POLL_Hub = Poll 2:2476/998 crash rdc line2 line 3
  1061.        Polls 2:2476/998 using the "crash"  flavour.   Lines 2 and 3 are forced
  1062.        to do an outbound rescan.  Dial counters and busy marks will  be  reset
  1063.        before the poll is created.
  1064.      $Call_System_Conditional = Poll 2:2476/999 immediate cond line1
  1065.        Only  if anything is on hold for 2:2476/999 (for example a file request
  1066.        with direct flavour), create an immediate  poll  and have line #1 do an
  1067.        outbound rescan.
  1068.  
  1069.  
  1070.      REFLAVOUR <node> [<oldflavour>] [<newflavour>] [RDC] [COND] [LINE<line#>]
  1071.      -------------------------------------------------------------------------
  1072.  
  1073.      The  REFLAVOUR  action  changes  everything that is on hold for the given
  1074.      node with flavour <oldflavour> to the new flavour <newflavour>.
  1075.  
  1076.      <node>:        node number in 3D or 4D
  1077.      <oldflavour>:  You can use all flavours that can be used with the POLL
  1078.      <newflavour>:  action (see there).
  1079.      [RDC] [LINE#]: Same meaning as for the POLL action.
  1080.      [COND]:        This meaning differs slightly from the meaning of the COND
  1081.                     flag for the  POLL  action.   If  COND  is  specified  for
  1082.                     REFLAVOUR,  the  reflavour  action  will  only  be done if
  1083.                     already any mail ->  with  <newflavour>  <- is on hold for
  1084.                     the destination system.
  1085.  
  1086.      Please note that  the  present  version  of  Unisched  can only reflavour
  1087.      UNPACKED mail (?UT packets) if no other unpacked mail with the given  new
  1088.      flavour  does  already  exist.  This is so because Unisched cannnot merge
  1089.      two PKT files into one.  (Unisched  will  not lose any mail in this case,
  1090.      it will simply refuse to do the reflavour).
  1091.  
  1092.      For  Arcmail and file attaches (?LO-files) this is not a problem, because
  1093.      they can easily be appended.   Unisched  will even change hold arcmail to
  1094.      crash if already other crash mail is on hold for the system, for example.
  1095.  
  1096.      There are two areas of application for the REFLAVOUR action.   The  first
  1097.      one  is  to  "undo"  polls.   For  example,  in Germany the Telecom has a
  1098.      special tariff which is extremely cheap in the area from 2 to 5 a.m.  You
  1099.      could create a poll  with  flavour  crash  for  an uplink in a heavy-load
  1100.      filenet  at  2 a.m., and you could then use REFLAVOUR to change all crash
  1101.      flags and mail attaches back to normal  at  5 a.m., for the case that you
  1102.      could not reach your uplink in this night:
  1103.  
  1104.      $POLL_GFDnet   = POLL 2:2476/999 crash
  1105.      $UNPOLL_GFDnet = REFLAVOUR 2:2476/999 crash normal
  1106.      #001 02:00 04:59    = $POLL_GFDnet
  1107.      #002 05:00 01:59    = $UNPOLL_GFDnet
  1108.  
  1109.      (The  last  two  lines will be explained later when events are explained.
  1110.      Don't worry about them for now).
  1111.  
  1112.      Another application is something that should be known to former Frontdoor
  1113.      sysops as "Unholding".  Imagine you would  want  to  deliver  high-volume
  1114.      bulk traffic (like filenets etc.) to an uplink.  You only want to deliver
  1115.      these  packets during the cheapest tariff (in Germany, from 2 to 5 a.m.).
  1116.      However, you also want to call  this uplink at other times for delivering
  1117.      crashmail or other things, but you don't want the filenet traffic  to  be
  1118.      sent  at  this  time.  What you have to do is to configure your ticker to
  1119.      create the filenet attaches as attaches with flavour "hold", so that they
  1120.      will normally not  be  sent  when  you  call  your  uplink at day tariff.
  1121.      However, when the cheap tariff timeslot starts, you need a way to  change
  1122.      the  flavour  of  these attaches from "hold" to another flavour (at least
  1123.      "normal", but if you want  to  make  them  cause  your mailer to dial the
  1124.      uplink probably to "crash").  Unisched can do it for you:
  1125.  
  1126.      $SEND_BULK_TRAFFIC_TO_2469999 = REFLAVOUR 2:246/9999 hold crash
  1127.  
  1128.  
  1129.  
  1130.      REMOVE <filename>
  1131.      -----------------
  1132.  
  1133.      The file designated by <filename>.   For  examples  when  this  might  be
  1134.      useful,  refer  to  the  SEMAPHORE  command  (see  below).   You  can use
  1135.      wildcards (since Unisched 1.0wb07).  If the  path is not an absolute one,
  1136.      it  is  assumed  to  be relative to the semaphore directory (refer to the
  1137.      SemaDir command, see above).
  1138.  
  1139.  
  1140.  
  1141.      REQUEST <filename> [!<password>] <nodenumber> [<flavour>] [LINE<line#>]
  1142.      -----------------------------------------------------------------------
  1143.  
  1144.      The given file will be requested (Fidonet File Request) at the given node
  1145.      by creating a .REQ file in  the  Binkley  Outbound.  Also, a poll for the
  1146.      given node will be created in order for the filerequest to be sent.
  1147.  
  1148.      <filename>   The name of the file or magic to be requested.
  1149.      !<password>  If the remote  system  requires  a  password  for  the  file
  1150.                   request  (this  means  a  special  request  password, it has
  1151.                   nothing to do with the  session  password), you can write it
  1152.                   after an exclamation mark.
  1153.      <nodenumber> Same as for the POLL action.
  1154.      <flavour>    "
  1155.      LINE<line#>  "
  1156.  
  1157.      Examples:
  1158.      $Request_Private_Filelist = REQUEST PVTFILES !SECRET 9:99/999 crash 2
  1159.      $Request_BLAND_Files = REQUEST ALLFILES 2:2476/418 crash 1
  1160.  
  1161.  
  1162.  
  1163.      RESTART
  1164.      -------
  1165.  
  1166.      Unisched will be re-initialised.  Among  other  things,  the  Config-File
  1167.      will be re-read. There are no parameters.
  1168.  
  1169.      Example
  1170.      $RESTART_UNISCHED = RESTART
  1171.  
  1172.  
  1173.  
  1174.      SEMAPHORE <filename> ["contents"]
  1175.      REMOVE <filename>
  1176.      -------------------------------
  1177.  
  1178.      The SEMAPHORE action  creates  a  semaphore  file  named <filename>.  The
  1179.      semaphore file has zero length.  The normal application  of  a  semaphore
  1180.      file  is to give signals to other programs about certain conditions.  For
  1181.      example, you can create semaphore  files  that make your Mailer exit, put
  1182.      it into suspend mode, and  other  things.   Correspondingly,  the  REMOVE
  1183.      action  removes  a  (semaphore)  file.   Attention:  Of course the REMOVE
  1184.      action is also capable of deleting  files that have more than zero length
  1185.      ;-).  If filenames do not contain path specifiers, the files are  assumed
  1186.      to reside in the semaphore directory (see SemaDir, above).
  1187.  
  1188.      For  example,  you  could use the SEMAPHORE action in order to create the
  1189.      file BTFREEZE.01, which makes Binkley  (task  1) go into suspend mode, so
  1190.      that you can shorten its  logfiles,  recompile  the  nodelist,  or  other
  1191.      things,  and  after  these tasks are done, you could use REMOVE to remove
  1192.      the BTFROZEN.01 file in order to make Binkley wake up again.
  1193.  
  1194.      (Hint:  Sometimes, it is of course  easier  to  do this from a batch file
  1195.      that  does  the  job  of  shortening  logfiles  or  similar,   by   using
  1196.      ECHO>BTFREEZE.01 and DEL BTFROZEN.01)
  1197.  
  1198.      Examples:
  1199.      $Freeze_BT1 = SEMAPHORE BTFREEZE.01
  1200.      $Unfreeze_BT1 = REMOVE e:\mailer\bt\flags\BTFROZEN.02
  1201.  
  1202.      Optionally, the action SEMAPHORE can  also  create files that do not have
  1203.      zero length, but a specific content.  If you want this, give the  desired
  1204.      contents  as  a  string  enclosed  in  double  quotes as parameter to the
  1205.      SEMAPHORE action.  Within the string, you can use \n to start a new line,
  1206.      \" to use a double quote as verbatim character, and \\ to use a backslash
  1207.      as verbatim character.  An  area  of  application  for this feature is to
  1208.      create an exit semaphore for the Xenia mailer.  Xenia  expects  the  exit
  1209.      semaphore file to contain the errorlevel code for exiting:
  1210.  
  1211.      $FinishTask1WithErrorCode99 = SEMAPHORE xmexit.1 "99"
  1212.  
  1213.  
  1214.  
  1215.      SEND <filename> <nodenumber> [<flavour>] [kfs | tfs] [LINE<line#>]
  1216.      ------------------------------------------------------------------
  1217.  
  1218.      The given file is sent to the  given system as file attach with the given
  1219.      flavour.  The parameters are identical to those  of  the  REQUEST  action
  1220.      (excpet that no password can be given).  Additional parameters are:
  1221.  
  1222.      kfs:  This keyword is short for "kill file when sent":  If  you  use  it,
  1223.            Unisched will instruct your mailer software to delete the file when
  1224.            it has been sent successfully.
  1225.      tfs:  This keyword is short for "truncate file when sent":  The file will
  1226.            be truncated to zero length after it has been sent sucessfully.
  1227.  
  1228.      Example:
  1229.      $Send_Hubdiff = SEND 24760900.UPD 2:2476/1 crash line2
  1230.  
  1231.  
  1232.  
  1233.     START ["<title>"] [/option ...] <program> <parameter> ...
  1234.     ---------------------------------------------------------
  1235.  
  1236.     This action is only available under OS/2.  It is  used  to  asynchronously
  1237.     start  child  processes in the background, i.E. Unisched will remain fully
  1238.     operable while the background process  is  executing (in contrast to EXEC,
  1239.     where Unisched is blocked until the child process terminates).
  1240.  
  1241.     Besides  that,  there  is another difference between EXEC and START:  EXEC
  1242.     simply passes any arguments it gets  to  the command processor, so you can
  1243.     EXEC anything from batch files over built-in commands to real executables.
  1244.     START, to the contrary, tries to directly execute the program, so you  can
  1245.     only  execute  .EXE  executables,  unless  you set special parameters that
  1246.     cause invokation of the  command  processor  (see below).  Also, EXEC will
  1247.     nearly always work on  anything  that  is  half  executable,  while  START
  1248.     sometimes will require special arguments to be able to correctly guess the
  1249.     session type to be started.
  1250.  
  1251.     The  arguments  to  the START action are nearly the same as the OS/2 START
  1252.     command that you can use at an  OS/2 prompt.  Type "help start" to receive
  1253.     information on this.  Nonetheless, you should  understand  the  difference
  1254.     between  START and EXEC START.  The START action is built in into Unisched
  1255.     and although it arguments resemble those of the OS/2 START command, it has
  1256.     nothing to do with that.  EXEC START, on the other hand, tells Unisched to
  1257.     invoke the EXEC action on the  OS/2  START command, i.E. Unisched starts a
  1258.     command processor and tells it to execute the START  command.   The  final
  1259.     result  of  START  and  EXEC START are more or less the same, but START is
  1260.     faster.
  1261.  
  1262.     Here is a quick summary on the possible arguments for the START action.
  1263.  
  1264.     "<title>"  A title to be used in the  window list and for the title bar of
  1265.                the window (if applicable).
  1266.  
  1267.     <program> <parameters ...>
  1268.                The name of the program, batch command or script that should be
  1269.                executed.
  1270.  
  1271.     In the  following  you  find  possible  options  for  the  start  command.
  1272.     Multiple  options  can  follow  each  other  directly  (/F/WIN,  e.g.)  or
  1273.     separated  by  a  whitespace character (/F /WIN, e.g.).  You should always
  1274.     completely specify the desired  options,  because  the default settings of
  1275.     the  options  strongly  depend  on  other  settings,  which  is  a  little
  1276.     confusing.
  1277.  
  1278.       - Session type: Set one of the following options:
  1279.  
  1280.         /FS         OS/2 fullscreen session
  1281.         /WIN        OS/2 windowed session
  1282.         /PM         OS/2 PM, graphical application
  1283.         /DOS/WIN    DOS windowed session
  1284.         /DOS/FS     DOS full screen session
  1285.  
  1286.       -  Foreground  or background:  One of the follwing options should be set
  1287.          to specify if the program window  should  pop up in the foreground or
  1288.          if the program should be started hidden in the background.
  1289.  
  1290.         /F          Start in the foreground.
  1291.         /B          Start in the background.
  1292.  
  1293.       - Window size. The following options are optional:
  1294.  
  1295.         /MAX        Start the window maximized.
  1296.         /MIN        Start the window minimized (hidden or iconified).
  1297.  
  1298.       - How to  start  the  program.   You  should  set  exactly  one of these
  1299.         options, with one notable exception:  If you use the /DOS option, none
  1300.         of these options can be used.
  1301.  
  1302.         /N          Start the program directly.  The session  will  be  closed
  1303.                     when  the program terminates.  Use this parameter to start
  1304.                     .EXE files.
  1305.         /C          Start the program via the command processor.  You must use
  1306.                     this option if you  want  to  start build-in commands (dir
  1307.                     etc.) or .CMD files (batch or REXX scripts), because these
  1308.                     need the shell (CMD.EXE or 4OS2.EXE) to be executed.   The
  1309.                     session   will   be  closed  when  the  program  /  script
  1310.                     terminates.
  1311.         /K          Works similar to the /C  option,  but the session will NOT
  1312.                     be closed when the proram or command has terminated.
  1313.  
  1314.       - Environment options. This parameter is optional.
  1315.  
  1316.         /I          Normally the program will "see" all environment  variables
  1317.                     that  are  known  to  Unisched (i.E. that were active when
  1318.                     Unisched has been  started).   If  you  use the /I option,
  1319.                     however, The programm  will  only  see  those  environment
  1320.                     variables  that  would  also be visiable to a "fresh" OS/2
  1321.                     window.
  1322.  
  1323.      Examples:
  1324.  
  1325.      $Tosser    = START "Tosser Task" /WIN/MIN/B/C e:\tools\toss.cmd
  1326.        ;The tosser task will be started as a minimized OS/2 window in the
  1327.        ;background. Because the tosser task is implemented as a batch file,
  1328.        ;we need the /C option to start it.
  1329.  
  1330.      $Fileindex = START /DOS /FS /B  e:\proboard\pbutil.exe fi
  1331.        ;A DOS program will be started as a full screen session. In order to
  1332.        ;prevent  the  system  from  switching  to  full  screen  mode,  the /B
  1333.        ;parameter is used.
  1334.  
  1335.      $Edit_Config_File = START /PM/F/N c:\os2\e.exe e:\usched\unisched.cfg
  1336.        ;This is a possible way for editing the config file of Unisched
  1337.        ;"on the fly". Later, in the chapter about trigger files, we will
  1338.        ;see how you can Unisched make to automatically re-read the config
  1339.        ;file after you have saved the changes.
  1340.  
  1341.      There is one thing, though, that you should always remember when starting
  1342.      sessions  asynchronously  with  the  START  action:   These  sessions run
  1343.      completely independent of the Unisched main task, so it is possible  that
  1344.      Unisched  will  start  multiple sessions in short sequence that then will
  1345.      run, at least partially, parallel to each other.  This sometimes can have
  1346.      undesired side effects, for example two tossers that run parallel to each
  1347.      other could damage  your  message  base,  unless  the  tosser has special
  1348.      mechanisms built in to prevent this, or a huge number of tossers  running
  1349.      parallel  could  eat  up  all  system  ressources.  If you do not want to
  1350.      provide for this case (by  using  special  lock  files in the batch files
  1351.      that  you  call,  or  by  using  the online tossing feature which will be
  1352.      described later), it might be  better  if  you  just use the EXEC or OPEN
  1353.      actions for such critical tasks.
  1354.  
  1355.  
  1356.  
  1357.   3.3.2 Recursions
  1358.   ----------------
  1359.  
  1360.   You  can  define  combined actions, i.E. action names that execute more than
  1361.   one of  the  actions  mentioned  above,  by  using  recursions,  i.E. action
  1362.   definitions that refer to other action definitions.
  1363.  
  1364.   Example:
  1365.  
  1366.   $poll_tobias = POLL 2:2476/418 crash
  1367.   $unhold_mail_for_tobias = REFLAVOUR 2:2476/418 hold normal
  1368.   $call_tobias = $unhold_mail_for_tobias $poll_tobias
  1369.  
  1370.   The  order  of  the definitions in the config file is arbitrary, and forward
  1371.   references are allowed, i.E.  you  could  also  write  the  last line in the
  1372.   example above before the other two lines.
  1373.  
  1374.  
  1375.  
  1376.   3.3.3 EVENTS
  1377.   ------------
  1378.  
  1379.   By now, you have learned what Unisched  can do, and how you create so called
  1380.   ACTIONS, i.E. symbolic names for actions that Unisched should perform.  Now,
  1381.   it is time to learn how to tell Unisched WHEN to perform these actions.
  1382.  
  1383.   In  general,  an  EVENT  contains information on a) a condition that must be
  1384.   true to perform a particular action, and b) a reference to the symbolic name
  1385.   of a previously defined ACTION.
  1386.  
  1387.   Unisched supports four type of EVENTS:  Semaphore files, static time events,
  1388.   periodic time events, and function keys.  We start to explain the last kind,
  1389.   because it is the easiest one.
  1390.  
  1391.  
  1392.      Function Key Events
  1393.      -------------------
  1394.  
  1395.      Syntax: Key<key> = $<action name> [$<action name> ...]
  1396.  
  1397.      This is the easiest kind of event:  You can assign a function key  to  an
  1398.      action,  and  if this function key is pressed when the Unisched window is
  1399.      active, the given action will  be  executed.   It  can be useful that you
  1400.      assign a function key to every major action that you intend  to  use  for
  1401.      Unisched,  so  that  for  debugging  purposes, you can always trigger any
  1402.      action manually.  For example, you  will  want to assign function keys to
  1403.      all poll actions, so that you can poll the respective uplink of yours any
  1404.      time by simply pressing the according function key.
  1405.  
  1406.      The following function keys are recognised by Unisched:
  1407.  
  1408.      KeyF1 .. KeyF10
  1409.      KeySF1 .. KeySF10 (SF means Shift+Function Key)
  1410.      KeyAltA .. KeyAltZ (Exception: Alt+X, which is hardcoded to exit Unisched)
  1411.      KeyAlt0 .. KeyAlt9
  1412.      KeyS0 .. KeyS9 (Shift + 0 .. Shift + 9)
  1413.      Key0 .. Key9
  1414.      KeyESC
  1415.  
  1416.      Examples:
  1417.      KeyF3 = $Call_My_Uplink
  1418.      KeyAltI = $Import_Mail $Play_WAV_File
  1419.  
  1420.  
  1421.  
  1422.      Semaphore Files
  1423.      ---------------
  1424.  
  1425.      Semaphore File Events are used to trigger Unisched actions whenever there
  1426.      occur  certain changes on a file system, like the creation of a new file,
  1427.      the deletion of a existing file, and similar.  A semaphore file is a file
  1428.      that usually does not  have  any  meaningful  contents, but simply by its
  1429.      existing it acts as a signal for a certain condition.  Unisched  somewhat
  1430.      extends  this  concept,  as  it  can  also  react to files that do have a
  1431.      meaningful content.  This will  be  explained  soon.   --- The concept of
  1432.      semaphore files is widespread in Fidonet technology.  FTN mailer software
  1433.      often is able to create a semaphore file when it has received  new  mail,
  1434.      and  it  often  is  also  possible  to  be  controlled by the creation or
  1435.      deletion of semaphore files, like exit sempahores, rescan semaphores, and
  1436.      others.
  1437.  
  1438.      Unisched supports two  main  types  of  semaphore  files:  so called FLAG
  1439.      FILES (this is what you might already know under the  term  "semaphore"),
  1440.      and  TRIGGER  FILES (these are files that signal some sort of action, but
  1441.      may not simply be deleted).  This is now explained in detail.
  1442.  
  1443.  
  1444.        Flag Files ("normal semaphores")
  1445.        --------------------------------
  1446.  
  1447.        Syntax: *<filename> = $<action name> [$<action name> ... ]
  1448.  
  1449.        As soon as Unisched sees the file designated  by  <filename>,  it  will
  1450.        delete  the  file and execute the given action.  This is the concept of
  1451.        flag files:  They  do  not  have  meaningful  content,  so  they may be
  1452.        deleted as soon as the condition that they signal has been  taken  care
  1453.        of.  - If <filename> does not contain a drive letter and path name, the
  1454.        file is searched in the directory specified by the SemaDir keyword (see
  1455.        above).
  1456.  
  1457.        Example:
  1458.        *e:\bt\flags\sema\btmail.in = $import_mail
  1459.  
  1460.        The main application of the flag file function is to let Unisched start
  1461.        your tosser program or batch as  soon  as the mailer has received mail.
  1462.        In order to achieve this, you have to tell your mailer to create a flag
  1463.        file as soon as any sort of  mail  has  been  received.   In  order  to
  1464.        achieve  this,  you  have  to  consult  the manual of your mailer.  For
  1465.        McMail and Binkley  XE  (but  only  XE!),  the corresponding keyword is
  1466.        "MailFlag", and additionally, you have to set the error level for  mail
  1467.        exits  to  zero  (McM),  or to completely remove the entry for the mail
  1468.        exit level from the event file (Binkley XE).  Binkley XE always creates
  1469.        a file called BTMAIL.IN, while McMail  allows to freely define the file
  1470.        name.
  1471.  
  1472.        If you use some other mailer and it does not support creation of a flag
  1473.        file when mail has been received, you can fake the functionality in the
  1474.        mailer batch:  Every mailer I know can exit with a defined error  level
  1475.        when  mail  has  been received.  In the mailer batch, you can then test
  1476.        for this error level, and use ECHO  > BTMAIL.IN or a similar command to
  1477.        create the mail flag file manually.
  1478.  
  1479.  
  1480.  
  1481.        Trigger Files
  1482.        -------------
  1483.  
  1484.        Syntax: ^<filename> = $<action name> [$<action name> ... ]
  1485.  
  1486.        The  difference  between  trigger  files  (denoted by ^) and flag files
  1487.        (denoted by *) is that  trigger  files  will NOT be deleted by Unisched
  1488.        when it executes the corresponding action.  If you use  trigger  files,
  1489.        the action has to take care that the file is deleted or moved elsewhere
  1490.        by  itself.
  1491.  
  1492.        An example where this is useful:  You use a time controlled event (this
  1493.        will be explained below) to request a list of f'reqable  files  from  a
  1494.        certain  system  every  month.  As soon as your mailer has received the
  1495.        file list (which always has the same name), you want Unisched to call a
  1496.        batch file that moves the  file  list  into  a directory of its own and
  1497.        unzip the file list:
  1498.  
  1499.        ^e:\mailer\inbound\24760999.zip = $unzip_the_filelist_of_2476_999
  1500.  
  1501.        The  action  that  is  started  does not need to immediately delete the
  1502.        file, it is allowed to use  as  much  time as it wants until it finally
  1503.        deletes the file or moves it elsewhere.  Unisched is not brain dead and
  1504.        will NEVER call an action twice  for  the  SAME  trigger  file.   After
  1505.        Unisched  has  started  an  action for a trigger file, it will remember
  1506.        that particular file and will not  start  the action again until it has
  1507.        seen that file vanish and reappear, or at least change its file  length
  1508.        or time stamp.  While this is an advantage, it of course means that you
  1509.        have  to  make  sure  that  the batch file called by the action, or the
  1510.        action  itself  finally  deletes the file or moves it away, or else the
  1511.        corresponding action will  never  be  executed  again,  not even if you
  1512.        manually stop and restart Unisched.
  1513.  
  1514.        Unisched will also not react on a trigger file as long as it  cannot be
  1515.        opened exclusively (i.E. for exclusive writing).  The logic behind this
  1516.        is  that most modern FTN mailer software places an exclusive lock while
  1517.        it is receiving a file.  Of course  you do not want the action to unzip
  1518.        the file list from the example above to be executed before the file has
  1519.        been fully received by the mailer.  This is  assured  because  Unisched
  1520.        cannot open the file exclusively while the mailer is still holding  its
  1521.        exclusive  lock  on  the  file.   Unisched will only trigger the action
  1522.        after the filelist has been fully received.
  1523.  
  1524.        Another thing that has to  be  taken  special  care  of is the usage of
  1525.        wildcards in the definition of trigger files.  Unisched  supports  this
  1526.        and handles it as follows:  All files that match on the given wild card
  1527.        will  be  treated  as  a single unit.  This means:  If any file appears
  1528.        that matches on the given  wildcard  pattern, Unisched will perform the
  1529.        corresponding action.  After that, it will not react to ANY other  file
  1530.        that  might  match  the  given pattern until exactly that file that has
  1531.        triggered the action  has  vanished  or  at  least  changed its size or
  1532.        timestamp.
  1533.  
  1534.        To sum it up, in most cases, the action that is executed when a trigger
  1535.        file is  detected  should  take  care  to  delete  or  move  away  this
  1536.        particular  file.  It is a must if you use wildcards, but normally also
  1537.        needed if you do  not  wildcards.   There  are  some exceptions to this
  1538.        rule, however.  For example,  you  could  define  the  config  file  of
  1539.        Unisched  (usually  Unisched.Cfg)  itself   as  a  trigger  file.   The
  1540.        assosciated action just tells  Unisched  to  reread  the  config  file.
  1541.        Unisched  will  then  always  reread  the  config  file  whenever it is
  1542.        modified, because when it is modified,  it changes its file time stamp,
  1543.        and this suffices for Unisched as a criterium to restart the associated
  1544.        action.  If you do it this way, you can simply  edit  the  config  file
  1545.        with  an  external  editor,  and  Unisched will detect when it has been
  1546.        modified and reread it automatically:
  1547.  
  1548.            $Reread_Config_File = RESTART
  1549.            ^e:\usched\unisched.cfg = $Reread_Config_File
  1550.  
  1551.  
  1552.  
  1553.        inverted flag files ("inverted normal semaphores")
  1554.        --------------------------------------------------
  1555.  
  1556.        Syntax: !*<filename> = $<action name> [$<action name> ... ]
  1557.  
  1558.        This sort of event definition  is  the  exact inversion of a flag file.
  1559.        (We remeber:  A flag file is deleted by Unisched  when  it  starts  the
  1560.        corresponding action).  With an inverted flag file, Unisched will start
  1561.        the  corresponding action as soon as the given file does not exist (any
  1562.        more).  Unisched recreates the file  (with zero length) before starting
  1563.        the action.
  1564.  
  1565.        A possible area of application for  this  feature  is  to  use  another
  1566.        software  to  test  if  Unisched  is  running  or not.  (Other types of
  1567.        software, e.g.  Mailers, know  this  concept  as an "alive semaphore").
  1568.        Example:
  1569.  
  1570.        !*e:\flags\unisched.alv = IGNORE
  1571.  
  1572.        Unisched will do nothing (the IGNORE command) in terms of actions  when
  1573.        the  file  unisched.alv vanishes, but it will recreate the file.  Other
  1574.        software can check if  Unisched  is  running  by  deleting the file and
  1575.        waiting for some time (approx 30 seconds should suffice unless you have
  1576.        changed the defaults) to see if it reapperas.  If it doesn't,  Unisched
  1577.        is not running.
  1578.  
  1579.          (A note to the more experienced readership:  You might ask yourselves
  1580.          why we did not have to write something like
  1581.  
  1582.          $Do_Nothing = IGNORE
  1583.          !*e:\flags\unisched.alv = $Do_Nothing
  1584.  
  1585.          Instead, we simply wrote the IGNORE command directly after the  equal
  1586.          sign.   You  have  just  discovered  that  the assignment of symbolic
  1587.          action names starting with a $  sign  is  in fact nothing more than a
  1588.          macro facility.  You could always write Unisched action commands like
  1589.          IGNORE, POLL,  EXEC  etc.  directly  after  the  "="  sign  in  event
  1590.          definitions.   Using  symbolic  names,  however, often gives a better
  1591.          structure in the config  file  and  also  often saves you from typing
  1592.          things twice, e.g. when the action to poll a certain person should be
  1593.          accessible both for time-controlled events  and  from  the  keyboard.
  1594.          There  is  also one situation when you must use symbolic names.  This
  1595.          is the case when  you  want  to  combine  two  actions into one.  You
  1596.          cannot write two action commands in sequence unless you use  symbolic
  1597.          names.    E.g.   "IGNORE  IGNORE"  is  not  valid,  but  "$Do_Nothing
  1598.          $Do_Nothing" is.)
  1599.  
  1600.        But to come back on topic:
  1601.  
  1602.  
  1603.  
  1604.        inverted trigger files
  1605.        ----------------------
  1606.  
  1607.        Syntax: !^<filename> = $<action name> [$<action name> ... ]
  1608.  
  1609.        Unisched will act as follows:  The  given action(s) will be executed if
  1610.        (as soon as) the given file does not exist.   After  that,  the  action
  1611.        will  not  be executed as long as the file keeps absent.  Unisched will
  1612.        register if the file reappears,  and  from  that time on, Unisched will
  1613.        again be prepared to start the corresponding action as soon as the file
  1614.        disappears.
  1615.  
  1616.        With inverted trigger files, wild cards CANNOT BE USED.
  1617.  
  1618.  
  1619.        Summary on Semaphores
  1620.        ---------------------
  1621.  
  1622.        Kind of semaphore  Marker  Action
  1623.        flag file          *       Unisched deletes the file
  1624.        trigger file       ^       Action has to delete the file
  1625.        inv. flag file     !*      Unisched creates the file
  1626.        inv. trigger file  !*      Action / external event must create the file
  1627.  
  1628.  
  1629.  
  1630.      Static Time Controlled Events
  1631.      -----------------------------
  1632.  
  1633.      Static  events are what you would at first place expect from a scheduler.
  1634.      (The terminus "static" is used to give a distinction between this kind of
  1635.      events and "periodical" events that will be explained later).  Quite some
  1636.      other scheduler software or built-in schedulers of  FTN  mailer  software
  1637.      have functions that resemble Unisched static events.  However, Unisched's
  1638.      conecpt  on how to handle those events, especially in case of overlapping
  1639.      events, is different and more intelligent in comparison to the concept of
  1640.      common FTN mailer schedulers.  So read on to learn how it works.
  1641.  
  1642.      Syntax:
  1643.      #<nr> <from> <to> [<weekday>] [<fromdate> <todate>] [even|odd] = $<action>
  1644.  
  1645.      <nr>:      This is the number of the event in the range from  0  to  999.
  1646.                 Every  time controlled event must have a unique number.  It is
  1647.                 used by Unisched to identify  the  event, so that Unisched can
  1648.                 keep track of various information pertaining  to  this  event.
  1649.                 The  event numbers need not be in sequence, or sorted (a event
  1650.                 that you define at the bottom of the config file is allowed to
  1651.                 have a lower number than  an  event  that is definied near the
  1652.                 top) --- the only thing that you must ABSOLUTELY take care  of
  1653.                 is that you never assign one number twice to different events.
  1654.                 Unisched  cannot  detect  this  situation, but will do strange
  1655.                 things if you do it.  EVENT NUMBERS MUST BE UNIQUE AND <= 999.
  1656.  
  1657.                 If you change anything  on  your  config  file, you should not
  1658.                 change the numbers of events  that  did  not  change,  because
  1659.                 everytime  that  you  change  the number of an event, Unisched
  1660.                 will loose all information that it has kept on the event.  For
  1661.                 instance, if the action of  an event has already been executed
  1662.                 and you change the event number, the action will  be  executed
  1663.                 again.
  1664.  
  1665.      <from>,
  1666.      <to>:      This is the start and end time of the event.  It is one of the
  1667.                 main points where Unisched's  behaviour is different from that
  1668.                 of common FTN mailer schedulers.  Unisched will make sure that
  1669.                 the action that is associated with this event will be executed
  1670.                 as soon as possible, but EXACTLY ONCE within  the  given  time
  1671.                 span.   You  can  quit and restart Unisched, and Unisched will
  1672.                 still not execute the event another time.
  1673.  
  1674.                 The consequence from this  is  that  you can usually use LARGE
  1675.                 time spans when defining static events.  For example,  if  you
  1676.                 define an event to poll your uplink at 05:00, it does not make
  1677.                 sense  to  let  the  event end at 05:01.  If, for some reason,
  1678.                 Unisched is not active  in  the  time between 04:59 and 05:02,
  1679.                 the event would not be executed, and this is probably not what
  1680.                 you want.  You want that if Unisched becomes active  again  at
  1681.                 05:03,  the  uplink  should be polled anyway.  Even if it only
  1682.                 becomes active at 06:00, the  uplink should be polled.  But if
  1683.                 it only becomes active at 07:30,  the  uplink  should  not  be
  1684.                 polled, because at 08:00, there is already the next event when
  1685.                 the  uplink should be polled.  For example ;-).  In this case,
  1686.                 you should take the time span to last from 05:00 until 07:00.
  1687.  
  1688.                 A time span from 05:00  to  07:00  would  mean  that  Unisched
  1689.                 normally starts the associated action at 05:00, but if for any
  1690.                 reason, Unisched cannot do it at 05:00 (for example because it
  1691.                 has EXECed a tosser batch  at  04:50  that took longer than 10
  1692.                 minutes), it will catch up for this event as soon as possible,
  1693.                 but it will not do it after 07:00.
  1694.  
  1695.                 Another time for those of you that only read bold letters:
  1696.  
  1697.                 DEFINING EVENTS THAT ONLY LAST  ONE  OR JUST A FEW MINUTE DOES
  1698.                 NORMALLY DOES NOT MAKE ANY SENSE.  IT USUALLY IS BETTER TO USE
  1699.                 A LARGER TIMESPAN (THAT LASTS  SEVERAL  HOURS  OR  EVEN  UNTIL
  1700.                 24:00), SO THAT THE EVENT CAN BE CAUGHT UP FOR IF NECESSARY.
  1701.  
  1702.                 Another important thing to note  if  you have been used to use
  1703.                 built-in shedulers of typical FTN mailers:
  1704.  
  1705.                 THE TIME SPANS OF SEVERAL EVENTS MAY  OVERLAP.   UNISCHED  CAN
  1706.                 HANDLE THIS PERFECTLY WELL.
  1707.  
  1708.                 In order to keep  track  of  which  event actions have already
  1709.                 been executed  and  which  haven't,  Unisched  uses  the  file
  1710.                 UNISCHED.DAY.   It  is  not  a  good idea to delete this file!
  1711.                 (Exception:  If you have  the  impression that Unisched is not
  1712.                 at all doing what you have configured, it might  be  the  case
  1713.                 that  the DAY-file contains wrong information or is broken, so
  1714.                 you might try to  delete  it).   If  you  delete the DAY file,
  1715.                 Unisched will think that no event actions have  been  executed
  1716.                 at  all  this  day,  and will consequently catch up for all of
  1717.                 them.
  1718.  
  1719.                 Also  note  that the time span may overlap the 24:00 boundary,
  1720.                 Unisched can handle this perfectly well.
  1721.  
  1722.      <weekday>: By default  an event is  valid  for every day of the week.  If
  1723.                 you want an event to be used only on certain  week  days,  you
  1724.                 can  place  the abbreviations of the desired week days here in
  1725.                 English  (Mo Tu We Th Fr Sa Su are valid abbreviations)  or in
  1726.                 German (Mo Di Mi Do Fr Sa So).  You can also use  the  special
  1727.                 keyword  "Week"  which defines the days Mo ..  Fr, and "WkEnd"
  1728.                 which is a synonym for  "Sa  Su".  If events overlap the 24:00
  1729.                 boundary, the week day of the *new* day is used, not  that  of
  1730.                 the old one!
  1731.  
  1732.      <fromdate>,
  1733.      <todate>:  You can use these options  to  specify that events should only
  1734.                 be valid on certain days of a  month  or  in  a  certain  date
  1735.                 range.   You can give the dates as day numbers, as combination
  1736.                 of day and month, or  as  a fully specified date consisting of
  1737.                 day, month and year.  German notation is used, i.E.  you  must
  1738.                 specify   the  day  number  BEFORE  the  month  number!   Some
  1739.                 examples:
  1740.  
  1741.                 01. 01.       ; every 1st day of each month
  1742.                 24. 31.       ; every 24st, 25st, .., 31st day of each month
  1743.                 20. 05.       ; every 20st, .., 31st, 1st, .., 05th day of
  1744.                               ; each month.
  1745.                 21.06. 22.09. ; do it on every summer day each year, i.E. from
  1746.                               ; June 21st until September 22nd.
  1747.                 24.12. 06.01. ; only during christmas holidays
  1748.                 01.01.2000 01.01.2000 ; only on the exact date of Jan 1st 2000
  1749.  
  1750.                 As you can see from the examples, you always have to specify a
  1751.                 complete date range (not just a single  datum)  with  a  start
  1752.                 and  end  date.  If you want an event to be executed only at a
  1753.                 single day, the start and end  day  are the same date (like in
  1754.                 the examples above, 01. 01. or 01.01.2000 01.01.2000).
  1755.  
  1756.      even, odd: If you specify either  the  "even"  or  the "odd" keyword, the
  1757.                 event will only be active if the current week number  (in  the
  1758.                 range  from  1 to 52) is even (resp. odd).  You could use this
  1759.                 feature to execute an event in  a 14 day period (for this, you
  1760.                 of course must also specify  a  certain  week  day,  like  "Su
  1761.                 even").
  1762.  
  1763.      <action>:  The action or name of the action.
  1764.  
  1765.      Examples:
  1766.      #010 00:00 24:00 01. 01.       = $Post_Statistics
  1767.      #020 00:00 04:00               = $Export_Mail
  1768.      #030 04:05 04:55 Mo We Fr      = $Poll_Uplink_1
  1769.      #040 04:10 04:55               = $Poll_Uplink_2
  1770.      #050 12:00 13:00 Mo even       = $Post_some_sort_of_information_mail
  1771.      #060 08:00 24:00 01.06. 22.06. = $Tobias_will_soon_have_his_birthday
  1772.  
  1773.  
  1774.  
  1775.      Periodic Events
  1776.      ---------------
  1777.  
  1778.      Periodic events are another  flavour  of  time  controlled events thas is
  1779.      used to have  certain  actions  be  executed  in  fixed  intervals.   For
  1780.      example,  you could execute a batch file or REXX script every 15 minutes,
  1781.      which checks if all mailers are  still  active (and does actions that try
  1782.      to fix this if not).  Another area of application is to have  the  system
  1783.      export  newly  written  mail  every xx minutes, or if you live in an area
  1784.      where local phone calls are for free, to generate automated polls to your
  1785.      Uplink every xx minutes.
  1786.  
  1787.      Syntax:
  1788.       #<nr> ~<min> [+<sync> | -<sync>] [exact] [<from> <to>] [<weekday[s]>]
  1789.                           [<fromdate> <todate>] = $<action[s]>
  1790.  
  1791.      <nr>:     Like  above,  a number in the range of 1 to 999 that identifies
  1792.                the event and must be unique.
  1793.  
  1794.      <min>:    The length  of  the  interval  between  execution  of the event
  1795.                action in minutes.
  1796.  
  1797.      <+sync>:
  1798.      <-sync>:  These  options  specify  synchronisation  offsets  in  minutes.
  1799.                Explanation:  Normally, periodical events will be  synchronised
  1800.                relative  to  0:00  (midnight).  This means that the times when
  1801.                the event is targeted for execution  are 0:00h + n * <length of
  1802.                interval>.  An event with a  period  of  60  minutes  would  be
  1803.                executed    at   0:00h,   1:00h,   ...,   23:00h.    By   using
  1804.                synchronisation offsets, you can shift the synchronisation time
  1805.                by some minutes into the future  or into the past.  If you have
  1806.                an  event  with  a  period  of  60  minutes  and   specify   an
  1807.                synchronisation offset of "+10", the  event will be executed at
  1808.                0:10h, 1:10h, ..., 23:10h.
  1809.  
  1810.                It is definitely  a  good  idea  to use synchronisation offsets
  1811.                especially if you have more than one periodic event  (by  using
  1812.                different  synchronisation  offsets,  they will be scheduled at
  1813.                different times,  so  that  the  stress  on  your  computer  is
  1814.                distributed better), or if you  use periodic events to generate
  1815.                polls (if  an  uplink  had  multiple  downlinks  that  all  use
  1816.                periodic events without synchronisation offsets, they would all
  1817.                try to poll him at the same time ...).
  1818.  
  1819.      exact:    Normally, Unisched catches up  for  the execution of a periodic
  1820.                event, i.E. it will do it later if it couldn't start it exactly
  1821.                at the scheduled time because Unisched was  down  or  otherwise
  1822.                busy.   This  makes  sense for most areas of applications.  For
  1823.                example, for a  mail  export  event,  it  is  not relevant when
  1824.                EXACTLY it is executed, only that it IS executed at least  once
  1825.                every xx minutes.  There are exceptions, however.  For example,
  1826.                if  you use periodic events to play a sound every 60 minutes at
  1827.                the full hour, you do  NOT  want  that  it is played at a later
  1828.                time.  Unisched should either play it, or if nothing helps, not
  1829.                play it, but it should not play  it  at  a  later  time.   This
  1830.                behaviour can be  enforced  by  specifying the "exact" keyword.
  1831.                If  present, Unisched will not catch up for a periodic event if
  1832.                it could not be executed at the exact scheduled time.
  1833.  
  1834.      The other parameters have the  same  syntax as for static time controlled
  1835.      events, but some of them  have  a slightly different meaning.  The <from>
  1836.      and <to> options specify a time span within which the periodic  event  is
  1837.      ALLOWED  to  be  executed.  In contrast to static events, periodic events
  1838.      could be executed  multiple  times  during  this  time span, depending on
  1839.      their period.  Also read the  explaination  for  the  examples  below  to
  1840.      understand this:
  1841.  
  1842.      Example:
  1843.      #510 ~60 -10 = $Export_Mail
  1844.      ;The $Export_Mail action is being executed every hour at minute 10, i.E.
  1845.      ;at 00:10, 01:10, ...  If Unisched is  busy at this time, the action will
  1846.      ;be executed at a later time, as soon as possible.
  1847.  
  1848.      #520 ~60 exact 08:00 20:00 Week Sa = $coocoo
  1849.      ;The $coocoo action (which plays a sound  at  every  new  hour)  will  be
  1850.      ;executed at every new hour. If Unisched can't play it at that exact time
  1851.      ;it will be skipped.  The $coocoo action will never be executed at a time
  1852.      ;that does not have minute 0. Also, the $coocoo action will only be done
  1853.      ;in the time from 08:00 to (and including) 20:00,  because during the
  1854.      ;night, we do not want to hear these sounds.
  1855.  
  1856.      #530 ~60 +30 exact 08:00 20:00 Week Sa = $half_hour_gong
  1857.      ;Like the previous example, but this action will ONLY be played at half
  1858.      ;hours, but not at full ones.
  1859.  
  1860.      Let  us  further  examine  how  exactly  periodic  events  are treated by
  1861.      Unisched.  To begin with, Unisched  synchronises a newly defined event to
  1862.      midnight (0:00 h) - or to a different time,  if  synchronisation  offsets
  1863.      have  been  used  (see above).  After that, it will schedule events to be
  1864.      executed each after the given period.   So if, for example, you define an
  1865.      event with a period of 15 minutes, this event will be scheduled at 0:00h,
  1866.      0:15h, 0:30h, 0:45h, 1:00h, and so on.
  1867.  
  1868.      If  Unisched  cannot  execute any of these events at the time when it has
  1869.      been scheduled, Unisched will execute them  as soon as possible, but only
  1870.      as long as the next instance of this event is not already  due.   In  our
  1871.      example,  if  Unisched  is busy between 0:14h and 0:25h with other tasks,
  1872.      the periodic event  action  would  be  executed  at  0:00h, 0:25h, 0:30h,
  1873.      0:45h, and so forth.  If Unisched would have been busy between 0:14h  and
  1874.      0:35h,  one instance of the event would be omitted, i.E. the action would
  1875.      be executed at 0:00h, 0:35h,  0:45h,  and  so on.  This behaviour ensures
  1876.      that there will never be an "event  congestion",  which  could  otherwise
  1877.      happen  if  for  example  you define a periodic event to be scheduled all
  1878.      five minutes, while the event action actually lasts 15 minutes ...
  1879.  
  1880.      If you don't want Unisched to  catch  up for periodic events at all, i.E.
  1881.      if the associated action of an periodic event should only be executed  at
  1882.      the  exact minute for which it originally has been sheduled, you must use
  1883.      the keyword "exact" in the  event  definition.   If you define an "exact"
  1884.      event with a period of 15 minutes and Unisched is busy between 0:14h  and
  1885.      0:20h,  the event would only be executed at 0:00h and 0:30h (and at later
  1886.      times, of course).  The only application where "exact" makes sense that I
  1887.      can imagine is if Unisched schould  play  a  sound at every full hour, or
  1888.      things like this.  In all other areas, it is better not to use "exact".
  1889.  
  1890.      The <from>, <to>, <weekdays>, <fromday> etc.  parameters  define  a  time
  1891.      frame  within which the event principally is ALLOWED to be executed.  (If
  1892.      omitted, the time frame is 0h to 24h).  They do not  at  all  change  the
  1893.      principal  mechanism  how synchronisation works as it is described above.
  1894.      I.E. Unisched schedules all  event  instances  for their proper execution
  1895.      time according to the event's period.  Only right before the event action
  1896.      is to be executed, Unisched tests if  the  current  time  is  within  the
  1897.      specified  time  frame,  upon  which  it  bases  its  decision whether to
  1898.      actually execute the event action or not.
  1899.  
  1900.      Here is an example for time frames:
  1901.  
  1902.      #123 ~15 14:50 17:25 = $Do_Something
  1903.  
  1904.      The action $Do_Something will be  executed  at  15:00h, and then every 15
  1905.      minutes.  Let us assume that Unisched  is busy with some other event from
  1906.      15:10 until 15:20.  The event will then  be  executed  at  15:20,  15:30,
  1907.      15:45.   You  see  that  the  scheduled execution time of 15:15 had to be
  1908.      postponed to 15:20 because Unisched was busy at 15:15.  Now let us assume
  1909.      that Unisched is busy from 15:50 until  16:47 (not that it is likely that
  1910.      Unisched is busy as long, but only  for  demonstration  purposes:).   The
  1911.      next  execution  of  the  event action will then be on 16:47, followed by
  1912.      17:00 and 17:15.  The scheduled execution times of 16:00, 16:15 and 16:30
  1913.      were omitted and 16:45 was postponed to 16:47 because Unisched was busy.
  1914.  
  1915.      As a side note, if  you  are  running a multitasking operating system and
  1916.      use the START action (OS/2), or use EXEC to execute that START command of
  1917.      your operating system (OS/2,  Windows),  it  is  not likely that Unisched
  1918.      will be busy for more than a few seconds,  so  normally  event  execution
  1919.      times  will  not have to be postponed at all.  However, Unisched has this
  1920.      logic built in so  that  its  behaviour  in  case of unexpected events is
  1921.      predictible, and of course also for DOS  users  that  must  EXEC  lengthy
  1922.      tossing  processes.   And  of course this logic is useful if Unisched has
  1923.      been down (i.E. terminated and  not  restarted) for some minutes or hours
  1924.      because of system maintenance.
  1925.  
  1926.  
  1927.   Now  you  know enough to set up a basic Unisched configuration file.  If you
  1928.   encounter problems or have questions  that  cannot be solved by this manual,
  1929.   feel free to contact me.  Refer to chapter 6 for contact information.
  1930.  
  1931.  
  1932.  
  1933.   3.4 USING UNISCHED
  1934.   ------------------
  1935.  
  1936.   You can start Unisched  by  invoking  UNISCHE2.EXE  (OS/2)  or  UNISCHED.EXE
  1937.   (DOS).   Unisched  will then search its configuration file, UNISCHED.CFG, in
  1938.   the directory where the executable file  is stored (and only there).  If you
  1939.   want to place the configuration  file  elsewhere,  or  want  to  give  it  a
  1940.   different name, you have to use the /c<filename> parameter, like for example
  1941.  
  1942.      UNISCHE2 /ce:\configs\uni.cfg
  1943.  
  1944.   In the directory where the configuration  file is stored, Unisched will also
  1945.   create some other files.  Normally, you do not have to  bother  about  them,
  1946.   but I will give a short explanation on what these files do anyway:
  1947.  
  1948.      UNISCHED.DAY  In  this  file,  Unisched  stores  information  about which
  1949.                    events have already been executed  today.   If  you  delete
  1950.                    this file while Unisched is not running, all events will be
  1951.                    redone  the  next  time that Unisched starts, provided that
  1952.                    the current time still  is  in  the allowable time frame of
  1953.                    each event.  So normally you should not delete this file to
  1954.                    avoid  multiple  executions  of  a   single   event/action.
  1955.                    Sometimes,  on  the  other  hand,  it can be useful to quit
  1956.                    Unisched, delete  this  file,  and  restart  Unisched  - in
  1957.                    particular if Unisched seems to do strange things like  not
  1958.                    executing  events  that  should  be  executed  or executing
  1959.                    periodic  events  at  other   times  than  expected.   Such
  1960.                    behaviour results if you previously did heavy  modifcations
  1961.                    on  Unisched.Cfg  and  did  not  obey  to  the  rule not to
  1962.                    reassign  an  event  number  that  has  been  in  use  to a
  1963.                    different, new event.  Unisched will come back on track  by
  1964.                    itself  sooner  or  later (at midnight at lastest), but you
  1965.                    can delete UNISCHED.DAY in order to accelerate this.
  1966.  
  1967.      UNISCHED.ACT  This file  contains  a  dump  of  the  log  window  and the
  1968.                    backscroll buffer.  The backscroll buffer contains all  log
  1969.                    entries  that  have  been written on screen (in contrast to
  1970.                    the log file, which  usually  contains more entries) and is
  1971.                    used so that you can scroll  back  and  forth  in  the  log
  1972.                    window. Deleting this file does not cause any harm.
  1973.  
  1974.      UNISCHED.BSY  This  is  a  semaphore file that indicates that Unisched is
  1975.                    already running with the corresponding config file.  If you
  1976.                    try to invoke Unisched  while  a  busy semaphore exists, it
  1977.                    will not start up in order  to  avoid  undefined  behaviour
  1978.                    that  would  result if two Unisched processes would work on
  1979.                    the same configuration file.  It  is a good idea to include
  1980.                    a command to delete UNISCHED.BSY in the system startup file
  1981.                    (STARTUP.CMD or AUTOEXEC.BAT, etc.), because if your system
  1982.                    locks or reboots while Unisched is active,  the  .BSY  file
  1983.                    will survive the reboot, and Unisched would not start after
  1984.                    the system has rebooted.
  1985.  
  1986.   If  you  start  Unisched  with  a  config  file  that does not have the name
  1987.   "unisched.cfg", the basename  of  the  abovementioned  files will be adapted
  1988.   accordingly.
  1989.  
  1990.   Example:    UNISCHED   /Ce:\configs\usched1.cfg
  1991.   This will start Unisched with the configuration file e:\configs\usched1.cfg.
  1992.   The  other files that Unisched creates will be named e:\configs\usched1.day,
  1993.   e:\configs\usched1.act and e:\config\usched1.bsy.
  1994.  
  1995.   If there is a severe error in the config file, Unisched will not  start  up,
  1996.   but  print  a  log message dump onto the screen (the actual error reason can
  1997.   normally be found near the bottom of this dump) and waits 30 seconds for you
  1998.   to press a key.  After that time, or if you press a key, it will exit.   Non
  1999.   severe errors like faulty event action syntax will be logged when the action
  2000.   is  about  to  be executed, but they will not prevent Unisched from starting
  2001.   up.
  2002.  
  2003.   When  you  managed  to  start Unisched, you will see a list of function keys
  2004.   that have been assigned by you  in  the configuration file in the upper part
  2005.   of the screen.  Below that, a two line display shows the next static and the
  2006.   next periodic time controlled event that will be executed.  The bottom  half
  2007.   of  the  screen  is  filled  with  the log window, that shows messages about
  2008.   events and actions and other things that happen while Unisched is running.
  2009.  
  2010.   While Unisched is  a  tool  that  is  designed  to  work  automatedly in the
  2011.   background, you can also use it interactively.  You can press  all  function
  2012.   keys  that  you have assigned previously.  There are also some function keys
  2013.   that are hard-wired, cannot be changed, and will always be present:
  2014.  
  2015.   Alt+X          Exit Unisched.
  2016.   Cursor Up:     Scroll the log window up (back) by one line.
  2017.   Cursor Runter: Scroll the log window down (forward) by one line.
  2018.   Page Up:       Scroll the log window up by one page.
  2019.   Page Down:     Scroll the log window down by one page.
  2020.   Home (Pos1):   Jump to the beginning (oldest entry) of the log window.
  2021.   End (Ende):    Jump to the end (latest entry) of the log window.
  2022.  
  2023.   Under  OS/2,  you  can  also terminate Unisched by simply clicking the close
  2024.   button (you should not do this with the DOS version in Windows or OS/2, only
  2025.   the native OS/2 version  has  this  functionality).  The native OS/2 version
  2026.   also terminates correctly when you do a system shutdown.
  2027.  
  2028.   These are all hard-wired keys that Unisched knows.  If you want to use other
  2029.   function  keys  to  invoke  certain,   you   can  define  them  with  KeyXXX
  2030.   configuration statements.  Here are some examples.
  2031.  
  2032.   You want Alt+J to make Unisched open a DOS (OS/2) shell?
  2033.  
  2034.     KeyAltJ = EXEC COMMAND.COM
  2035.   or:
  2036.     KeyAltJ = EXEC CMD.EXE
  2037.  
  2038.   You want to have a hotkey that pops up an editor where you  can  change  the
  2039.   Unisched configuration?
  2040.  
  2041.     $EditConfig = EXEC c:\msdos\edit.exe e:\mailer\sys\unisched.cfg
  2042.     $ReadConfig = RESTART
  2043.     $DoConfig = $EditConfig $ReadConfig
  2044.     KeyAltC = $DoConfig
  2045.  
  2046.   Infinite possibilities are imaginable ... ;-)
  2047.  
  2048.  
  2049.  
  2050. 4. ADVANCED UNISCHED USAGE
  2051. --------------------------
  2052.  
  2053.   4.1 ONLINE TOSSING
  2054.   ------------------
  2055.  
  2056.   4.1.1 - What is Online Tossing?
  2057.  
  2058.     Let us consider the case that for example you get  two  arcmail  packages,
  2059.     each  2  MB  in  size, from your uplink during a poll.  First, your mailer
  2060.     receives both packages, a total of  4  MB.   After that, it creates a flag
  2061.     file that triggers (because Unisched sees the flag file) the tosser  task,
  2062.     which  will process the packets.  The net time that passes from the moment
  2063.     that you start  your  outgoing  call  until  the  moment  when the mail is
  2064.     available for your downlinks is the time that you need to transfer  all  4
  2065.     MB, plus the time that your tosser takes to process it.
  2066.  
  2067.     Online  Tossing  is a technique to reduce this time.  It works as follows:
  2068.     You ask your uplink not to  send  you monolithic 2 MB arcmail packets, but
  2069.     to reduce the arcmail packet size to, say, 400 KB per packet.  Most tosser
  2070.     have a way to limit this size, so ask your uplink if his one supports  it.
  2071.     The  function  of  Unisched  in  this context is as follows:  Unisched can
  2072.     continuously monitor  your  inbound  directory.   As  soon  as any arcmail
  2073.     packet has been received completely, Unisched will start the tosser  which
  2074.     in  this  way  is  able  to process the first arcmail packet while you are
  2075.     still polling the  other  ones!   As  soon  as  your  tosser  is done with
  2076.     processing the first arcmail packet, Unisched will  again  look  into  the
  2077.     inbound  directory  and  if  (as soon as) any further arcmail packets have
  2078.     been received, Unisched  will  restart  the  tosser  to also process these
  2079.     ones.
  2080.  
  2081.     The result is that when you have finally  finished  polling  your  Uplink,
  2082.     there is only the very last arcmail packet still untossed, and your tosser
  2083.     will toss it within a much shorter time than if it  would  still  have  to
  2084.     toss  the  whole amount.  Also, if for example you are running a multiline
  2085.     system and a downlink calls you  at  a time when you have already received
  2086.     3.6 MB out of 4 MB, the downlink will probably already get those 3.6 or at
  2087.     least 3.2 MB out of those 4 MB, while if you would not use Online Tossing,
  2088.     he would get nothing.
  2089.  
  2090.     Online Tossing effectively reduces the time  until new mail polled at your
  2091.     uplinks will be available for your downlinks.
  2092.  
  2093.   4.1.2 - System Requirements for Online Tossing
  2094.  
  2095.     1. You should have a good knowledge of your system and some experience
  2096.        with Unisched.
  2097.     2. Your mailer and operating system must have support for file  sharing  /
  2098.        locking.   I.E.  while  a  mailer  is still receiving a file, it should
  2099.        disable access to those files for  other processes by opening them with
  2100.        SH_DENYALL.  This is the only way for Unisched to know  when  the  file
  2101.        has  been  received  completely:  as soon as it is not locked any more.
  2102.     3. Your system must be capable of doing 100% reliable multitasking.
  2103.     4. Your tosser must be configured correctly.
  2104.  
  2105.     Remarks on item  2:   I  tested  the  software  McMail, BinkleyTerm XE and
  2106.     Cantaloup.  McMail 1.0g5 and later versions worked OK.   Binkley  XE  also
  2107.     worked  OK  (except for DOS XR1 and XR2, you must either use a later gamma
  2108.     like XR6 or an OS/2 version).  Cantaloup 1.0 also worked OK.  Also do note
  2109.     that  on  DOS,  you must load SHARE.EXE for file locking support.  You can
  2110.     test if your system  is  ready  for  online  tossing  (with regard to file
  2111.     locking) in the follwing  way:   F'request  a  large  file  that  takes  a
  2112.     sufficiently  long  time  for  downloading.   While  your  mailer is still
  2113.     downloading the file, try to  run  TYPE  on  this file.  You should get an
  2114.     error message about a sharing violation.  If you get it, online tossing is
  2115.     OK, if you don't get it, your  mailer  software,  OS  or  network  is  not
  2116.     capable of file locking.
  2117.  
  2118.     Remarks on item 3:  You would probably not be using Unisched if  you  were
  2119.     not using some sort of multitasking system, be it OS/2, Windows, DESQview,
  2120.     or  a  network  of  many  DOS  PC's.   However,  not  all  system  that do
  2121.     multitasking are also fit for  online  tossing.  In normal operation (i.E.
  2122.     without online tossing), the tosser task only runs occasionally while  the
  2123.     mailer  is  transferring  files.   If  starting the tosser task produces a
  2124.     single CRC error, or decreases the CPS rate slightly by 5% or  so,  it  is
  2125.     OK,  because  it only happens rarely and does not last long.  If, however,
  2126.     you are using online tossing, you  do enforce that EVERYTIME when you have
  2127.     a mailer connect, the tosser task WILL start while  the  mailer  is  still
  2128.     transferring  files.  Or to put it the other way round, ALL of your mailer
  2129.     connects will definitely be accompanied by a tosser process running in the
  2130.     background.  The requirements  that  result  from  this  are simple:  Your
  2131.     multitasking system must be capable of running a  background  tosser  task
  2132.     with NO visible impact on CPS rate or connection quality AT ALL.
  2133.  
  2134.     If  your  system  is  capable  of  doing  this  strongly  depends  on your
  2135.     individual configuration.  Generally, an OS/2  PC  with a Pentium 90, SCSI
  2136.     hard disks and ISDN TAs (not passive cards!) using FIFO's and Ray  Gwinn's
  2137.     SIO.SYS  using  native  OS/2  mailers  and  tossers  will be OK.  I tested
  2138.     several of those configurations  and  they  fulfilled my requirements.  As
  2139.     for Windows PCs, well, I also tested several of those ... to put  it  this
  2140.     way, it is possible that Windows also fulfills the requirements, but it is
  2141.     not  very  likely  that  a  default  Windows  Fido setup does.  Generally,
  2142.     systems with EIDE tend to have  impacts on communication quality while the
  2143.     hard disk is running, while systems with SCSI are usually better off.
  2144.  
  2145.     Remarks on item 4:  You absolutely have to make sure that your tosser will
  2146.     remove ALL packets, PKT  files  and  Arcmail  packets  from  your  inbound
  2147.     directories,  either  by  processing them or by moving them to a bad path.
  2148.     If your tosser cannot process a packet, because of security considerations
  2149.     or because it is broken, it  MUST  move  the  packet to another path or at
  2150.     least rename it to *.BAD or something.   If  it  doesn't,  Unisched  would
  2151.     restart  the  tosser  as  soon as it has finished, because Unisched thinks
  2152.     that there is still mail that has  to  be tossed.  This would result in an
  2153.     endless loop.  -- Generally, Fastecho is OK in this  respect,  though  you
  2154.     have to take some considerations even with Fastecho.
  2155.  
  2156.     Online tossing is not for the weak of heart.  Unisched provides you with a
  2157.     lot of help and guidance, but never the less, you  can  easily  stop  your
  2158.     system from working reliably with online tossing ;-).
  2159.  
  2160.     Now  if  you  are scared by this huge bunch of warnings, let me assure you
  2161.     that online tossing is working  flawlessly  on  my  own system, and that I
  2162.     know about a dozen other users of Unisched that use it as well.
  2163.  
  2164.  
  2165.   4.1.3 - How to do it!
  2166.  
  2167.     After this prolongued epilogue, I will  now  tell you what you have to put
  2168.     into your configuration file for online tossing to work.   Some  of  these
  2169.     keywords have not been mentioned in the previous chapter!
  2170.  
  2171.  
  2172.      Inbound = <inbound directory>
  2173.      -----------------------------
  2174.  
  2175.      This is a directory where Unisched will look for .PKT files, and ONLY for
  2176.      .PKT files.   You  should  configure  your  unprotected inbound directory
  2177.      (that one in which you receive crash mails from  system  with  which  you
  2178.      don't  have  a  password  -  you usually want only to toss PKT files from
  2179.      here, but  never  arcmail  packets)  with  this  keyword.   The "Inbound"
  2180.      keyword may be repeated as often as you desire.
  2181.  
  2182.      Example:
  2183.      Inbound=e:\bt\inbound
  2184.      Inbound=e:\bt\local
  2185.  
  2186.  
  2187.      ProtIn = <directory>
  2188.      --------------------
  2189.  
  2190.      In this directory,  Unisched  will  look  for  .PKT  files,  for  arcmail
  2191.      attaches  (*.MO?,  *.TU?,  ...  *.SU?), and, if enabled (see below), also
  2192.      for *.TIC files.  You can  repeat  the  "ProtIn"  keyword as often as you
  2193.      desire.
  2194.  
  2195.      Example:
  2196.      ProtIn=e:\bt\secure
  2197.  
  2198.  
  2199.      TosserSema = <filename>
  2200.      -----------------------
  2201.  
  2202.      This sempahore file serves communication purposes  between  Unisched  and
  2203.      the  online  tossing  tosser  task.   Unisched  creates this file when it
  2204.      starts the tosser task  after  finding  a  mail  packet in the configured
  2205.      inbound directories.  As long as it does exist, it will not start another
  2206.      instance of the tosser task.  Consequently it is a good idea to let  your
  2207.      system startup scripts delete this file.
  2208.  
  2209.      Example:
  2210.      TosserSema = e:\sema\tossing.sem
  2211.  
  2212.  
  2213.      TosserAction = $<action1> [$<action2> ...]
  2214.      ------------------------------------------
  2215.  
  2216.      With  this  keyword  you  specify the action that will be executed if any
  2217.      mail packet hsa been found.  Usually,  the  action will invoke a batch or
  2218.      script file.  In writing this script file, you should take  care  of  the
  2219.      following requirements:
  2220.  
  2221.      - Reapeating this again, the online tossing batch  or  script  file  MUST
  2222.        remove  all  PKT  and  Arcmail  (*.MO?  ..  *.SU?) files from the given
  2223.        inbound and protin directories in  order to avoid endless tossing loop.
  2224.        If the tosser sometimes leaves files in the  inbound  directores  (good
  2225.        tossers  rename packets which they cannot process to *.BAD, but not all
  2226.        tossers are good ...),  the  batch  file  has  to  take care of this by
  2227.        issueing the respective RENAME commands.
  2228.  
  2229.      - When the batch file has finished, the file that has been specified  as
  2230.        argument to the TosserSema parameter MUST be deleted, so that Unisched
  2231.        knows that it can restart the tosser task if necessary.
  2232.  
  2233.      - You should NOT invoke the ticker software (TIC file processor, Filefix,
  2234.        Allfix,  etc.)  in  this batch file, because if the remote mailer first
  2235.        sends the TIC file and sends the file that is described by the TIC file
  2236.        after the TIC file  itself,  it  could  happen  that your batch file is
  2237.        invoked  when  the  TIC  file  has  already  been  received,  but   the
  2238.        corresponding binary file has not yet been received, so that the ticker
  2239.        would treat the TIC file as bad.
  2240.  
  2241.        You  should  only invoke the ticker in a batch file that is executed by
  2242.        Unisched AFTER the  mailer  session  has  completed.   You do this with
  2243.        tosser task dependent semaphores, see below.
  2244.  
  2245.      To sum it up:  The batch file should only process netmail  and  echomail,
  2246.      but it should process ALL mail. Also it must delete the TosserSema file.
  2247.  
  2248.      Example:
  2249.      TosserAction = $Import_Mail_Only
  2250.  
  2251.  
  2252.      Tosser Task Dependent Semaphore Files
  2253.      -------------------------------------
  2254.  
  2255.      Syntax: +<path+filename> = $<action name> [$<action name> ... ]
  2256.  
  2257.      Semaphores declared like this work like normal flag files (those declared
  2258.      with  an  asterisk  "*"),  except  for  the  case  when  the file that is
  2259.      configured  with  TosserSema  keyword  exists.   In  this  case, Unisched
  2260.      ignores a tosser dependent semaphore file for as long as  the  TosserSema
  2261.      file does exist.
  2262.  
  2263.      You  need  tosser  task  dependent  semaphore  files  in conjunction with
  2264.      online tossing.  As  has  been  explained  above,  some  actions that are
  2265.      normally performed in a tosser batch file (like invoking the file ticker)
  2266.      must NOT be performed in the online tossing  tosser  batch  file.   Those
  2267.      actions must be performed in a batch file that is being executed when the
  2268.      mailer session has finished completely.
  2269.  
  2270.      They  way  to  go  is  to test for the "inbound mail semaphore" that your
  2271.      mailer creates  (like  BTMAIL.IN  or  simlar,  the  file  that the mailer
  2272.      creates when a session has finished and anything has been received during
  2273.      this session).  You should, however, not use normal flag files  ("*")  to
  2274.      test  for  the  inbound  mail  semaphore if you are using online tossing,
  2275.      becuase in thise case the "end  of  session batch file" could be executed
  2276.      while the "online tossing batch file" (the one defined  in  TosserAction)
  2277.      is  still  running.   Instead,  you  use tosser task dependend flag files
  2278.      ("+") to test for the  inbound  mail  semaphore.  This will make Unisched
  2279.      ignore the inbound mail semaphore as long as the online tossing batch  is
  2280.      still  running,  but  invoke  the  "end  of session batch" as soon as the
  2281.      online tossing batch has  finished  (if  any  mail  has been received, of
  2282.      course).
  2283.  
  2284.      Unisched also provides for the reverse case:  When Unisched executes  the
  2285.      action  that  has  been  defined  with  a  "+"  (tosser  task  dependent)
  2286.      semaphore   definition,  it  creates  the  file  that  is  configured  as
  2287.      "TosserSema". So the result is:
  2288.  
  2289.      THE END OF SESSION BATCH  FILE  that  you  configure with "+" MUST DELETE
  2290.      THE "TosserSema" FILE!!!
  2291.  
  2292.      Example:
  2293.      +btmail.in = $end_of_session_batch
  2294.  
  2295.  
  2296.   4.1.4 - Good Luck!
  2297.  
  2298.      Now that you have read everything, I suggest that you sleep a night  over
  2299.      it  and  contemplate  what  actually  is  going  on there :-), before you
  2300.      actually start to configure it.
  2301.  
  2302.  
  2303.  
  2304.   4.2 SELECTIVE SUPPRESSION OF LOG FILE MESSAGES
  2305.   ----------------------------------------------
  2306.  
  2307.   In principle,  the  keywords  DiskLog,  ScreenLog  and  PipeLog  give  you a
  2308.   possibility to control how much information you want to see in the disk  log
  2309.   file,  in  the  log  window or in the control pipe.  However, sometimes, the
  2310.   granularity of these commands is not good enough.
  2311.  
  2312.   An example situation might be a  periodic  event that does nothing more than
  2313.   to create a semaphore file regularly (so that other supervisor  tools  could
  2314.   see  that  Unisched  is  still  running).   Normally,  you would want to see
  2315.   information about periodic  events  to  be  logged,  but for this particular
  2316.   event, you do not want to see log information because it would pollute  your
  2317.   log files with too much detail.
  2318.  
  2319.   For situations like that, you have the possibility  to  selectively  exclude
  2320.   information  about  a certain event and the corresponding actions from being
  2321.   logged by including  the  whole  event  definition  in  square brackets.  No
  2322.   information pertaining to conditions that lead to execution of  this  event,
  2323.   nor  information  pertaining  to the execution of the event commands itself,
  2324.   will be printed neither into screen, nor disk, nor pipe log.
  2325.  
  2326.   For example, an entry like
  2327.  
  2328.   $Create_Alivesemaphore = SEMAPHORE e:\flags\unisched.alv
  2329.   #111 ~1 = $Create_Alivesemaphore
  2330.  
  2331.   would  lead  to  a  massive  pollution  of  your  log  file  with  senseless
  2332.   information, so you will want to change these lines either like this:
  2333.  
  2334.   [ $Create_Alivesemaphore = SEMAPHORE e:\flags\unisched.alv ]
  2335.   #111 ~1 = $Create_Alivesemaphore
  2336.  
  2337.   or like this:
  2338.  
  2339.   $Create_Alivesemaphore = SEMAPHORE e:\flags\unisched.alv
  2340.   [ #111 ~1 = $Create_Alivesemaphore ]
  2341.  
  2342.   or like this:
  2343.  
  2344.   [ $Create_Alivesemaphore = SEMAPHORE e:\flags\unisched.alv ]
  2345.   [ #111 ~1 = $Create_Alivesemaphore ]
  2346.  
  2347.   to prevent inclusion of information about this action in the log.
  2348.  
  2349.  
  2350.  
  2351.   4.3 DELAYED REACTION ON SEMAPHORE FILES
  2352.   ---------------------------------------
  2353.  
  2354.   Recapitulating the information from chapter 3, a line like
  2355.  
  2356.   *btmail.in = $start_the_tosser
  2357.  
  2358.   will make Unisched, as soon as  the  file  btmail.in is found, a) execute an
  2359.   action (in this case, the action named $start_the_tosser, which we assume to
  2360.   start the tosser task) and b) delete  the flag file btmail.in.  We call this
  2361.   a FLAG FILE definition.
  2362.  
  2363.   A line like
  2364.  
  2365.   ^\mailer\inbound\xxxfiles.zip = $unpack_filelist
  2366.  
  2367.   will make Unisched start the given action as  soon  as  the  given  file  is
  2368.   found, but Unisched will not delete the file.  Unisched will not trigger the
  2369.   action  again  unless the file vanishes (probably because the action deletes
  2370.   or moves it, or because of some other effects) and then reappears.  We  call
  2371.   this a TRIGGER FILE definition.
  2372.  
  2373.   Sometimes,  however,  you  might wish that Unisched does not react instantly
  2374.   when one of these files  is  created  by  another program,  but you may wish
  2375.   that Unisched only reacts if the file  is  older  than  a  given  number  of
  2376.   minutes  or  seconds  (or in another way of viewing it, if the file has been
  2377.   in existance for a minimum duration).
  2378.  
  2379.   You can do so by specifying the desired  delay  in  minutes  within  pointed
  2380.   brackets directly  after  the  asterisk  (*)  or  hat  (^)  character of the
  2381.   semaphore file definition.
  2382.  
  2383.   Here are two examples of application:
  2384.  
  2385.   4.3.1 Delaying the export of newly written mails
  2386.  
  2387.      ^<-10>echotoss.log = $export_local_mail
  2388.  
  2389.      Mail editors like Timed or Msged can create a  file  named  echotoss.log,
  2390.      netmail.jam, echomail.jam or similar that contains information about what
  2391.      area  you have written mails in.  Some mail editors create this file only
  2392.      when you exit the mail editor, while  other  update the file as soon as a
  2393.      new mail has been entered.
  2394.  
  2395.      While the main usage of these  files  is  to reduce the CPU time usage of
  2396.      the tosser by instructing it to only export mail from some areas  instead
  2397.      of  scanning the whole message base mostly in vain, you could also simply
  2398.      regard these files as an indication  for newly written mail.  So it would
  2399.      make sense to instruct Unisched to start the mail export  batch  file  as
  2400.      soon as such a file is created.
  2401.  
  2402.      However, at least for me it is not uncommon that I write a mail, save it,
  2403.      and some minutes later, things come into my mind that I would like to add
  2404.      to the mail, or I decide to change it substantially.  If this also occurs
  2405.      to you frequently, it is a bad  idea  to configure Unisched in a way that
  2406.      it instantly exports all newly written mail, because as soon as a mail is
  2407.      exported, you cannot change it without major hassle.
  2408.  
  2409.      Therefore, you may want to use delayed trigger files like in the  example
  2410.      above.   The  command  line that is shown above will instruct Unisched to
  2411.      wait 10 minutes before reacting to the echotoss.log file.  So you have 10
  2412.      minutes time to decide if  you'd  rather  delete  the flame that you have
  2413.      just written, rather than exporting it. ;-).
  2414.  
  2415.  
  2416.  
  2417.   4.3.2 Test if the mailer is still up and running.
  2418.  
  2419.      *<-30>e:\flags\cl-alive.01 = $some_action
  2420.  
  2421.      The mailer Cantaloup creates a file named cl-alive.<task_number> when  it
  2422.      starts  up.   Also,  Cantaloup "touches" (updates the time stamp of) this
  2423.      file  every  five  minutes.   Most  other  mailer  software  has  similar
  2424.      features.
  2425.  
  2426.      If you configure Unisched  like  shown  above,  as  long as everything is
  2427.      working OK, Unisched will never react to cl-alive.01,  because  Cantaloup
  2428.      will  periodically  touch  the file, so the file will never be older than
  2429.      five minutes for Unisched's eyes,  but  Unisched  would only react if the
  2430.      file was at least 30 minutes old.
  2431.  
  2432.      If, however, something unusal happens to Cantaloup -- i.E. if it  crashes
  2433.      --,  the  file  cl-alive.01  will  no longer be touched by Cantaloup, and
  2434.      after half an hour, Unisched will  detect this problem and has the chance
  2435.      to perform some action against it  (usually  this  means  to  reboot  the
  2436.      system because you cannot know what in detail went wrong, but some sysops
  2437.      do more sophisticated things here)
  2438.  
  2439.      However,  you should be aware of the fact that some mailers do not update
  2440.      the alive flag as long as a  BBS  is spawned.  In this case, you must set
  2441.      the delay to a value that is greater than the  maximum  allowable  online
  2442.      time in your BBS.
  2443.  
  2444.      Also, there are other (more common!) reasons for mailers not being up and
  2445.      running  than  a  crash.   The  most common reason at my system is that I
  2446.      inadvertently close the mailer (think  of your baby daugther running over
  2447.      the keyboard <g> -- although you can also do it without little  children,
  2448.      as my example proves ...).   In  this  case, the cl-alive.01 file will be
  2449.      deleted by Cantaloup before it closes, and Unisched will not see an "old"
  2450.      alive semaphore file.
  2451.  
  2452.      Therefore if you are using delayed trigger files that test  if  a  mailer
  2453.      has  crashed  you  should always combine them with inverted trigger files
  2454.      that test if the mailer is running at all, and restart it if not:
  2455.  
  2456.      !^e:\flags\cl-alive.02 = $Start_CL_Task_1
  2457.  
  2458.  
  2459.  
  2460. 5. SHAREWARE / LICENSE
  2461. ----------------------
  2462.  
  2463. UniSched  is  (C) 1996-99 by Tobias Ernst.  This software is Shareware and may
  2464. be evaluated free of charge  for  a  period  of  30  days.  You may spread the
  2465. Shareware version among friends, over BBSes or the internet as long as you  do
  2466. this  without modifying the original distribution archive or its contents.  If
  2467. you continue to use Unisched after the  evaluation period of 30 days, you must
  2468. register the software.
  2469.  
  2470. Registration of Unisched is EUR 12 or US$ 12.  When you register Unisched, you
  2471. will receive a personalized key that will be valid for  all  future  text-mode
  2472. OS/2  and  DOS  versions of Unisched.  A registration form can be found in the
  2473. REGISTER.ENG file.  Note that the  key  is  only  a proof that you are legally
  2474. using Unisched after the evaluation period is over.  It does  not  enable  any
  2475. new  feature,  as  the  Shareware  version  of  Unisched  is not restricted or
  2476. crippled in any way.  Also note that the author denies any responsibilites for
  2477. any damage that might be  the  direct  or indirect consequence from using this
  2478. software.
  2479.  
  2480.  
  2481.  
  2482.  
  2483. 6. CONTACT AND SUPPORT
  2484. ----------------------
  2485.  
  2486. Fidonet (preferred):
  2487.  
  2488.   I do regularly monitor the following echomail areas:
  2489.  
  2490.       FIDO_UTIL
  2491.       OS2BBS.GER
  2492.       FIDOSOFT.MISC.GER
  2493.  
  2494.   All of them are certainly good  places  to  place to discuss Unisched, and I
  2495.   will also answer therein if you post a question on Unisched.
  2496.  
  2497.   You can reach me via Fidonet netmail at
  2498.  
  2499.       Tobias Ernst @ 2:2476/418
  2500.  
  2501.   The lastest version of Unisched will always be available for filerequest
  2502.   using the magic UNISCHED at my fido node (2:2476/418).
  2503.  
  2504. Internet:
  2505.  
  2506.   There is a  mailing  list  available.   Announcements  about new versions of
  2507.   Unisched will be made there, and you can post questions  and  discuss  about
  2508.   the  program  with  other  users.  To subscribe to the mailing list, send an
  2509.   e-mail to
  2510.  
  2511.                unisched-list-request@bmtmicro.net
  2512.  
  2513.   and put the string
  2514.  
  2515.                subscribe
  2516.  
  2517.   as the only line into  the  body  of  the message.  (Even though the mailing
  2518.   list is powered by BMT Micro, you can of course also participate  in  it  if
  2519.   you are not (yet?  <g>) a registered user.)
  2520.  
  2521.   You can also reach me via e-mail at
  2522.  
  2523.                ternst@bmtmicro.net
  2524.  
  2525.   The most recent version of  Unisched will always be available at
  2526.  
  2527.                ftp://ftp.bmtmicro.com/bmtmicro
  2528.  
  2529. [EOF]
  2530.