[Request] need code

08/07/2009 18:49 rgaguena#1
Can someone make a code for an automatic restart of the server every 2 hours.. Please.and Thanks.
i work in lotf source
08/07/2009 18:59 Pete1990#2
post this in general.cs

HTML Code:
                Restart = new System.Timers.Timer();
                Restart.Interval = 6000000;
                Restart.Elapsed += new ElapsedEventHandler(Restart_Elapsed);
                Restart.Start();
This to

HTML Code:
        public static void Restart_Elapsed(object sender, ElapsedEventArgs e)
        {
            Process nServ = new Process();
            nServ.StartInfo.FileName = Application.StartupPath + @"\DexCo.exe";
            nServ.Start();
            World.SaveAllChars();
            Environment.Exit(0);
        }