Subj : Problems with events run
To   : mark lewis
From : Sean Dennis
Date : Sat Feb 26 2011 01:31 pm

Hello, mark.

Saturday February 26 2011 at 11:09, you wrote to me:

ml> the problem may be the semaphores and exit errorlevels that you can
ml> access and catch, though...

Max simply exits via an errorlevel and that's the end of its involvement until
it's called back to start again.  What I've done is written a little Pascal
program that will cause the node to "sleep" until the semaphore file that is
specified when it's called is deleted.

Here's the program:

=== Cut ===
Program WaitFor;

Uses
 SysUtils;

Begin
 Repeat
   SysCtrlSleep(10);
 Until Not FileExists(ParamStr(1));
End.
=== Cut ===

Since all of my BBS nodes run off of a single batch file, here's the part that
matters (it's called via an errorlevel exit):

=== Cut ===
:Nightly
echo . > maint.run
if %1 == 2 goto runmaint
waitfor maint.run
goto loop
 :runmaint
  rem ** Run Scrabble nightly maintenance
  cd\doors\scrab
  sdmaint 2
  cd\max\drom
  checkreq
  cd\max
  call scores.cmd 32
  call scores.cmd 33
  call scores.cmd 34
  rem ** Purge inactive (no calls in 60 days) BBS users ***
  rem muep /p
  rem *** Rebuild the file base indices ***
  fbp -a
  del maint.run
  goto Loop
=== Cut ===

"Loop" is the top of the batch file that will call each node back up.  This is
untested as of yet but I'll work on it later tonight hopefully.

Later,
Sean

... Experience is a good school.  But the fees are high. - Heinrich Heine
--- GoldED/2 3.0.1
* Origin: Paragon BBS - 423.434.0851 - paragon.darktech.org (1:18/200)