|
Answer» good day everyone:
i have a problem with making a batch file:
i run a server wich crashes pretty often due overflow of information (too many wan access) and each time i have to manualle excecute the PROGRAMS so the sistem be online again, but sometimes i am not arround and the thing crashes and cant be restarted
i have been told that by making a simple batch file i could make it that so it detects when the server stops working and restart it automatically without having to touch a thing,
please note that this server is run by 3 programs that connect each other on the same pc:
login server selection server program server
the selection server is the one that crashes very often
could any of you help me do a batch file to make it auto restart the 3 servers in case they crash/shut down?
thank you!this is more or less what i was told to do but i dont know anything more of it, can someone TELL em what im missing?
@ECHO off start /min logserv.bat start /min selserv.bat start /min progserv.bat
and then the bat files it refers to are as follows:
sel-server:
CODE
@echo off :charserv start /min /wait sel-server.exe conf\ca.conf goto selserv
Login-server:
CODE
@echo off :logserv start /min /wait login-server.exe goto logserv
prog-server:
CODE
@echo off :progserv start /min /wait prog-server.exe conf\ca.conf goto progserv
can someone aid me??
If you want a critique of your batch files, here goes:
Code: [Select] sel-server: the goto and the label do not match
login-server: there is no parameter for the executable; presumably conf\ca.conf
prog-server: SEEMS ok
Without knowing what the EXECUTABLES are doing, it's impossible to help you decide if this is a workable solution.
The best way to debug batch files is to run them and see what happens. The CMD processor will be more than happy (gleeful actually) to point out your syntax errors.
Good luck.
|