LCKB
Write pliz sourcecode bat file (to restart every 5 min Connector - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Programmers Gateway (https://lckb.dev/forum/forumdisplay.php?fid=196)
+---- Forum: Coders Talk (https://lckb.dev/forum/forumdisplay.php?fid=192)
+---- Thread: Write pliz sourcecode bat file (to restart every 5 min Connector (/showthread.php?tid=962)

Pages: 1 2


- ilyas77 - 07-15-2012

I have sprung Connector and have to sit there and watch it, you can do so would restart every 5 minutes the Connector was, that is, the program closes and re-opens




- ilyas77 - 07-16-2012

I have gives out a mistake that has taken off, and it would be necessary to press a cancelling that restart to make, can throw off an initial code what to open through another the console and it is better to restart everyone 5 mines (So it will be better)




- ilyas77 - 07-16-2012

pliz let the script is ready for insertion into the bat file




- someone - 07-16-2012


Here is a simple batch example:

@echo off
echo Basic Batch Connector restarter
Confusedtart
tasklist /nh /fi "imagename eq Connector.exe" | find /i "Connector.exe" >nul && (
rem "Connector.exe" found
) || (
echo "Connector.exe" not found
start Connector.exe
)
timeout /t 200 /nobreak
goto start
pause




- ilyas77 - 07-16-2012

It is I myself wrote, you can then throw the script to connector rebooted, that is opened and closed a new old ... But this only opens a new




- someone - 07-16-2012


It is I myself wrote, you can then throw the script to connector rebooted, that is opened and closed a new old ... But this only opens a new
What?your reply does not make sense, first you ask for us to make a restarter, and now you say you made one.




- ilyas77 - 07-16-2012

No, this is a bad restart, it just opens every 5 minutes a new console and want to shut down the old and ran a new




- someone - 07-16-2012


The code is good, checks for the process if exists and it it has the status running then it starts a new process, if the process doesnt exist:

@echo off
echo Starting Connector Restarter
Confusedtart
tasklist /nh /fi "imagename eq Connector.exe" /fi "status eq running" | find /i "Connector.exe" >nul && (
tasklist /nh /v /fi "status eq Not Responding" | find /i "Connector.exe" >nul && (
echo "Connector.exe" crashed
taskkill /im Connector.exe /f
taskkill /im WerFault.exe /f
start Connector.exe
)||(
echo "Connector.exe" found
)
) || (
echo "Connector.exe" not found
start Connector.exe
)
timeout /t 200 /nobreak
goto start




- Wizatek - 07-16-2012



:10
Connector.exe
goto 10




- -S-y...? - 07-28-2012


This bat will your Connector or waht ever for a Server Restart by a Crash with Log's

I have this bat from Gothic.

 

@ECHO OFF
CLS
title Connector AUTO Restarter [****** / ***]
color 82
echo Started at %TIME%

:SERVERLOOP1
echo There cash server was restarted at %TIME%
start connector.exe
PING 127.0.0.1 -n 2200 > NUL
echo ---------------------------------------------
TASKKILL /f /IM "connector.exe"
goto SERVERLOOP1
:END