[Request]Auto Restart Server

08/30/2008 21:16 pauldexter#1
Can anyone/somesone post a tutorial how to restart your server for about 15 or 10 min or higher.
using LOFT source.

thanks
08/30/2008 21:57 keving#2
Some Sources have them,look around :)

greets keving
08/30/2008 22:58 IceyMan#3
lol idk if that was much help...

try adding it in the sources auto restart folder.. if it dun have ti then idk..
08/30/2008 23:14 glupkotrup#4
Lol close the hosting program and open it :D:D
08/30/2008 23:37 YukiXian#5
Put an Timer on it... Very easy

* Searching all Mob Mechs for free!!! *
08/31/2008 03:40 kinshi88#6
In General.cs

Code:
        public static System.Timers.Timer RestartTimer;
Code:
                RestartTimer = new System.Timers.Timer();
                RestartTimer.Interval = <Interval in Miliseconds>
                RestartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
                RestartTimer.Start();
Code:
        void RestartTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            Process nServ = new Process();
            nServ.StartInfo.FileName = Application.StartupPath + @"COServerProject.exe";
            nServ.Start();
            World.SaveAllChars();
            Environment.Exit(0);
        }
08/31/2008 08:29 pauldexter#7
thanks for that
08/31/2008 09:06 jochemke#8
tnx kinshi88 this helped me alot cause i couldn't fix it but finnaly i know what was wrong
08/31/2008 09:39 KraHen#9
You could even add a new timer with <Interval in Miliseconds> minus one minute, and broadcast the restart on GM channel.
08/31/2008 09:48 kinshi88#10
Quote:
Originally Posted by pauldexter View Post
thanks for that
Anytime, whatever yah need.

Quote:
Originally Posted by jochemke View Post
tnx kinshi88 this helped me alot cause i couldn't fix it but finnaly i know what was wrong
Yeah dude, anytime. Good good.

Quote:
Originally Posted by ElDeRnEcRo View Post
You could even add a new timer with <Interval in Miliseconds> minus one minute, and broadcast the restart on GM channel.
Yes you could, always a good idea.