Main > Main Forum
Automatically Restarting a Front End
(1/4) > >>
Bill Mote:
Does anyone know how to monitor the Front End and restart it if it stops?  I know "firedaemon" can do this if you launch your FE as a process and I've come up with a simple .bat file that launches mamewah:


--- Code: ---:RUNFE

CD C:\MAMEWAH
@CALL MAMEWAH.EXE

GOTO RUNFE

--- End code ---

This launches MAMEWah and returns control to the batch file if mamewah exits.  It relaunches mamewah automatically, but this feels more like a hack than anything respectable ;)  Firedaemon costs $40 for home use.  I'm not that ashamed of my batch file.  Just curious if anyone knows of a better and/or more sophisticated way to do this.

dot
fjl:
I'm by no means a coding pro. Everything I know I learned on my own. This is one thing I learned from playing around with DOS...



--- Code: ---@echo off
:relaunch
start /wait Frontend.exe
goto :relaunch

--- End code ---

Basically what it does is open a program and waits for it to close. If it closes it loops back to the command that opens it and again waits for it to close. It repeats this indefinitely until someone closes the DOS Batch Window. Which is the only problem, a DOS Window pops up when this is inserted into a batch file. But I suppose you can add it to a previous batch file or something.
gonzo90017:
You know how the old saying goes. If it works....
Bill Mote:
If it works tweak it?  :P

dot
TheShanMan:
Not sure how well FE's would work as a service, but you could try getting one of those "run app as a service" programs and set it to run your FE as a service. Then go into the services "properties" dialog and set it to interact with desktop (otherwise you will never see the FE). Finally you can tell it to restart if the process terminates in that same dialog.

This is assuming you're using XP.
Navigation
Message Index
Next page

Go to full version