Depending on the nature of what happened when TeleFlow stopped running, you may be able to trigger certain events when it stops. (Was it simply not running, or was the system crashed/frozen?) Assuming you are running TeleFlow Server from the command line (not as a service), you can create a batch file with the following content. You can run whatever program you want after the line that says "rem * If TF_Server exits, the following code will run". (so, you could set up a command-line email product to send a particular message to a particular email address in the event of the server stopping.)
<br>
<br>Of course, if this batch file works properly, TeleFlow Server would be automatically restarted in the event of a failure. Note that the section in which you run added code after the server stops would also run if you Ctrl-C the batch file, so we would recommend simply using the 'X' to close the window when you wish to stop the server intentionally.
<br>
<br>In addition, anything at all you can tell us about the state of the system when the server stopped might help us in determining what went wrong, since we would much prefer to solve the underlying problem...
<br>
<br>BATCH FILE CONTENTS:
<br>
<br>@echo off
<br>rem TF_ServerLoop
<br>rem -------------
<br>rem Starts TeleFlow Server in a infinate loop to automatically
<br>rem recover from errors.
<br>rem (c) 2000, 2001 enGenic.
<br>rem All rights reserved.
<br>rem
<br>rem Parameters:
<br>rem -----------
<br>rem %1 Drive where the application is installed D:
<br>rem %2 System location CanMtg
<br>rem
<br>rem slashes will be added automatically, eg:
<br>rem %1\%2\bin
<br>rem
<br>
<br>mode 80,100
<br>title TF Server Loop
<br>
<br>echo ______________________________________________________
<br>echo.
<br>echo Teleflow Infinite Server Recovery System
<br>echo (c) 2000 Engage! Software Corp. All rights reserved.
<br>echo ______________________________________________________
<br>echo.
<br>echo Now loading...
<br>
<br>rem * Capture server startup date and time to log
<br>date/T >> %1\%2\bin\TF_ServerLoop.log
<br>time/T >> %1\%2\bin\TF_ServerLoop.log
<br>echo >> TFServer Loop Started %1\%2\bin\TF_ServerLoop.log
<br>echo ------------------------------------------------- >> %1\%2\bin\TF_ServerLoop.log
<br>
<br>:LOOP
<br>
<br> rem * Capture date and time of crash to tracking file
<br> date/T >> %1\%2\bin\TF_ServerLoop.log
<br> time/T >> %1\%2\bin\TF_ServerLoop.log
<br> echo >> TFServer start of loop %1\%2\bin\TF_ServerLoop.log
<br> echo ------------------------------------------------- >> %1\%2\bin\TF_ServerLoop.log
<br>
<br> rem *** Clean-up directories and run TeleFlow Server
<br> rem ***
<br> %1
<br> cd \%2
<br>
<br> rem * Create one-time back-up of all crash-log files
<br> rem *
<br> rem mkdir %1\%2\log\backup
<br> rem xcopy %1\%2\log\*.* %1\%2\log\backup\ /Y
<br>
<br> rem * Clear the log directory for the next run of the lines.
<br> rem *
<br> rem del/q %1\%2\log\*.*
<br>
<br> rem * Start tfserver...
<br> rem *
<br> cls
<br> echo ___________________________________________
<br> echo.
<br> echo Teleflow Server Running - DO NOT INTERRUPT!
<br> echo ___________________________________________
<br> echo.
<br> TFServer.exe
<br>
<br> rem * If TF_Server exits, the following code will run
<br> echo ________________________________
<br> echo.
<br> echo ** Teleflow Server Error! ***
<br> date/t
<br> time/t
<br> echo ________________________________
<br>
<br> rem * Change the title so we know it crashed
<br> rem *
<br> title TF Server Loop - YELLOW FLAG
<br>
<br> rem * Take a 30 second rest, then restart
<br> rem *
<br> echo.
<br> echo Re-starting in 30 seconds...
<br> echo.
<br> NtSleep /Q 30
<br>
<br>goto LOOP
<br>
<br>
<br>
<br>Another batch file, one used to start the above, might look like this:
<br>
<br>@echo off
<br>rem +---------------------------------------------------------
<br>rem | TFServerStart.BAT
<br>rem | Manages the re-starting of the TeleFlow Server
<br>rem +---------------------------------------------------------
<br>
<br>cls
<br>echo ___________________________________________________________
<br>echo.
<br>echo Starting TeleFlow Server
<br>echo Please wait, or press CTRL+C to abort
<br>echo ___________________________________________________________
<br>echo.
<br>
<br>C:
<br>cd \TeleFlowApp
<br>
<br>echo.
<br>echo ------ Start! ------
<br>
<br>start "TFServer Loop" /min bin\TF_ServerLoop C: TeleFlowApp
<br>
<br>echo.
<br>echo ------ Done. ------
|