[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

comparing file time to server time - code validation

Asked by rise4peace in Active Server Pages (ASP)

Hello,

My question is rather lengthy so please bear with me.

I have written a kiosk program in Macromedia Director. This kiosk program displays informational items as well as displays employee photos. The kiosk program is installed on 6 different machines throughout a manufacturing plant. Since the kiosks are spread across the manufacturing plant floor, the client wanted an easy solution for checking the status of each of the kiosks to see if they were running.

My solution to this problem was to create a couple of .asp pages for monitoring as well as creating text files.

The first .asp page I wrote is called 'kioskupdater.asp'. The only function of this .asp page is to create a file on the server using the name of kiosk as the filename that is created on the server. This .asp page is called from within the kiosk program every 2 minutes. Thus the kiosk file, which is named according to the kiosk, is being updated on the server every 2 minutes. This .asp page is working without any problems.

The second .asp page I wrote, and I need help with validating the code, is called 'index.asp'. In a nutshell this .asp pages main functionality is to compare the modified time of the kiosk file that was created by the 'kioskupdated.asp' page against the time on the server. If the modified time of the kiosk file happens to be greater than the 'offset' time, a graphic displaying the kiosk being 'offline' is suppose to be displayed. Conversely if the kiosk files modified time falls within the 'offset' time, a graphic displaying the kiosk being 'online' is displayed. Finally if no kiosk file has been created for a particular kiosk a 'n/a' graphic is displayed.

This is what the index.asp page looks like when it's running:
http://www.rise4peace.com/index.asp.jpg

This is the code behind the index.asp page:
http://www.rise4peace.com/index.asp.txt

The main function of the 'index.asp' page is called:

is_kiosk_active("asm_ping", 15)

The first parameter is the name of the kiosk file that should be present on the server. The second parameter is the offset time. The index.asp page passes the name of each of the kiosk files that should be present on the server along with the same offset time.

The problem that I am experiencing is that every once in awhile the index.asp page will report that one of the kiosks is 'offline' but in actuality it is not. My concern is that one or more my time comparison routines is failing and thus returning an 'offline' graphic.

Since I am comparing the kiosk files military time against the servers military time I think I may have an issue with it crossing over into a new day but I am just not 100% sure. Since this is my first attempt at writing .asp code I am hoping that one of the many gurus here can help point out any problems within the code I have written.

Many thanks,

rise4peace
[+][-]03/04/04 11:18 AM, ID: 10516712Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Active Server Pages (ASP)
Sign Up Now!
Solution Provided By: alorentz
Participating Experts: 2
Solution Grade: A
 
[+][-]03/04/04 11:27 AM, ID: 10516804Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/04 11:34 AM, ID: 10516879Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/04 11:34 AM, ID: 10516880Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/04 12:28 PM, ID: 10517402Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/04 12:29 PM, ID: 10517412Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/04 12:29 PM, ID: 10517413Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/04 12:35 PM, ID: 10517498Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/04 12:50 PM, ID: 10517655Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/04 05:37 PM, ID: 10519253Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/04 06:06 PM, ID: 10519376Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/04 06:17 PM, ID: 10519421Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/04/04 07:44 PM, ID: 10519833Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/04/04 10:20 PM, ID: 10520426Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89