Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 01-26-2005, 08:03 PM   #1 (permalink)
Forum Expert
 
Johabius's Avatar
 
Join Date: Dec 2004
Location: Kansas, USA
Age: 38
Posts: 4,964
Send a message via ICQ to Johabius Send a message via Yahoo to Johabius
Default Adjusting Autorestart

Here is my question of the day...I have set up my server to automatically restart at 7pm, and I want to give an advanced warning to the people on the shard of 5 minutes until restart. I've set up the restart time correctly, but when it comes up that the server will be restarting shortly it almost instantly restarts instead of waiting for five minutes and then restarting.

Code:
namespace Server.Misc
{
	public class AutoRestart : Timer
	{
		public static bool Enabled = true; // is the script enabled?

		private static TimeSpan RestartTime = TimeSpan.FromHours( 19.0 ); // time of day at which to restart
		private static TimeSpan RestartDelay = TimeSpan.Zero; // how long the server should remain active before restart (period of 'server wars')

		private static TimeSpan WarningDelay = TimeSpan.FromMinutes( 5.0 ); // at what interval should the shutdown message be displayed?

		private static bool m_Restarting;
		private static DateTime m_RestartTime;
Should I change the TimeSpan.FromMinutes part from 5, because that seems to be seconds and not minutes to 300, because there are 300 seconds in five minutes?
Johabius is offline   Reply With Quote
Old 01-26-2005, 08:22 PM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

You want to use this:

private static TimeSpan RestartDelay = TimeSpan.Zero; // how long the server should remain active before restart (period of 'server wars')

The warning is how often the warning will appear.

Doesn't appear otherwise, by default, since there is no point.
Phantom is offline   Reply With Quote
Old 01-26-2005, 11:39 PM   #3 (permalink)
Forum Expert
 
Johabius's Avatar
 
Join Date: Dec 2004
Location: Kansas, USA
Age: 38
Posts: 4,964
Send a message via ICQ to Johabius Send a message via Yahoo to Johabius
Default

Thanks I appreciate the response
Johabius is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5