You are here:

ColdFusion Programming/detect session variable after a period of time

Advertisement


Question
QUESTION: good day,

sir srini, i created a page wherein you can see online users, online meaning the users that logged-in on that page. what i did to monitor the online users is that after each user logged-in, i update a field in a database (checkbox) to indicate that they are online. then i query all the user that have their field on the database checked.

my problem is my session variable needs to be set to expire in an hour and when a user's session variable expires he is still indicated as online since his checkbox field on the database wasn't updated (since i dont know how to do it)

please advice how can i show all user that has their session variable expires.

ANSWER: Hi,

you need to run a service to check whether session expired, if so you need to update the database that the user is offline.

-Srini

---------- FOLLOW-UP ----------

QUESTION: Thank you for that, but please elaborate.
what do you mean to run a service. what service do i need to run? is it also a page created as cfm?

Answer
hi

Sorry for the late in response, I was so busy at my work...

If you goto Administrator module on coldfusion you will be seeing a separate section you can add run a coldfusion page on any specific time or every 5 min etc.. like that.

You can build a page to check the session if expired remote the checkbox.

Hope you understand now.

Thanks

-Srini

ColdFusion Programming

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini

Expertise

I have extensive knowledge on coldfusion MX, cfc etc...

Experience

Contact me if you need any custom development on ASP.NET, ASP, Coldfusion, Powerbuilder

©2012 About.com, a part of The New York Times Company. All rights reserved.