1 Reply Latest reply on Feb 12, 2008 6:31 PM by -==cfSearching==-

    exposing SessionTimeOut and time since last activity

    steve_shapiro
      I'd like to run a backup routine when there is nobody active in our application. I have an cfm applet that will do this, looking for live sessions and looping every 60 seconds. We have SessionTimeOut set for 2 hours. If users log out, everything is clean, but if they close their browsers without logging out, the applet that is testing for live sessions keeps their session alive.

      I can see the login Date/Time in the Session, but not the time since last activity. Is Time Since Last Activity exposed anywhere?

      thanx,

      Steve Shapiro
      University of Oregon
        • 1. Re: exposing SessionTimeOut and time since last activity
          -==cfSearching==- Level 4
          You might consider using the coldfusion.runtime.SessionTracker. It should give a more reliable count of active sessions. Though if you are using CF8 it may not be accessible if access to internal components has been disabled.

          Another possibility might be to create a scheduled task that would run when the application is likely to be inactive. You could disable logins during that time and display a message that the application is unavailable due to maintenance and will be available again at xyz time.