terminator_vn
asked on
display a popup msg when server is going down in 30 minutes
Hi experts,
I have a website and would like to notify to our users when they are working on their end. I want to send a prompt message in 15 minutes before the server is went down at 10:00pm.
I have set a timer
DateTime startTime = DateTime.Now;
DateTime myDateTime = DateTime.Now.Date.AddHours (22); // 22 is 10:00pm
I want to have a function to validate for timing.
If 9:45 pm an automate popup message is displayed and it says. Our server is going down in 15 minutes. Please save your work and exit out the website.
Any help would be greatly appreciated.
I have a website and would like to notify to our users when they are working on their end. I want to send a prompt message in 15 minutes before the server is went down at 10:00pm.
I have set a timer
DateTime startTime = DateTime.Now;
DateTime myDateTime = DateTime.Now.Date.AddHours
I want to have a function to validate for timing.
If 9:45 pm an automate popup message is displayed and it says. Our server is going down in 15 minutes. Please save your work and exit out the website.
Any help would be greatly appreciated.
See the link below:-
http://forums.asp.net/post/4452433.aspx
http://forums.asp.net/post/4452433.aspx
ASKER
Thank you for responding. Do you have a specific example that allow the popup message in 15 minnutes before its server goes down. I have a server nightly maintenance at 10:00pm. At 9:45 pm..I would like to have an automate popup message to alert that ..a server is going down in 15 mins.
Thanks in advance.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have found my solution...
Easy (but less flexible), on each page load store the time the server is going down in JavaScript. Then have a little JavaScript polling function that checks the time and when its 15mins to go pops up the alert box.
Harder (but more flexible way), have the JavaScript use AJAX to poll the server, and the server returns the time its going down. The server needs an AJAX/JSON response function. This will still work if you change the time the server is going down while a client is on the page.