1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Windows Windows server auto restart tool

Discussion in 'Community Dev Corner' started by Vamist, Jan 10, 2018.

Mods: Downburst, Mazey
  1. Vamist

    Vamist THD Team THD Team Tester

    Messages:
    544
    I made a small windows server restart tool. The reason i made this is becuase TC kept freezing, and not closing, so the .bat file restart would not work.

    What this does is checks the KAG api when the last time your server updated its 'lastUpdate'. If its 30 seconds apart from when it checks, it will close down KAG (If its frozen) and re-open a new one. Just download the AutoRestart.zip, extract the exe file to kag folder location and run the exe on the machine the server is running from, input the IP (Dont use 127.0.0.1) and port that the server is using, and it will check every so often.
    There are 3 commands:
    "Kill" - Will kill the kag server (if its running)
    "Run" - Will Run the kag server
    "Check" - Which will start the api check (Does not need to be used, since it does this after you type in ip and port)

    I might make it into a gui into the future, or add more features.

    This was made in c#, and it's a console application, it uses .net framework 4.5. The code of the program is in ProgramCode.zip if anybody wants to look at it. I'l see about uploading it to github in the future.

    Pictures:
    [​IMG]
     

    Attached Files:

    Last edited: Jan 10, 2018
    jonipro and BarsukEughen555 like this.
Mods: Downburst, Mazey