TIP: Click on subject to list as thread! ANSI
echo: muffin
to: mark lewis
from: Sean Dennis
date: 2011-02-26 13:31:52
subject: Problems with events run

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)
SEEN-BY: 3/0 633/267 640/954 712/0 313 550 620 848
@PATH: 18/200 261/38 712/848 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.