Gracefully Logging off on Idle

  • Thread starter Thread starter jwgoerlich
  • Start date Start date
J

jwgoerlich

Hello all,

Due to the corporate security policy, I have an application that must
be terminated if it is idle for more than an hour. Users are getting
at this app from a terminal services session. I can easily set the
idle time on the RDP/ICA listener to reset the session after an hour.
However, in doing so the app is forcibly closed. This causes problems
within the app.

What I need is to close the app before resetting the session. From the
top of my head, I can think of two ways to do this: 1) have the
session gracefully log off rather than forcibly reset; 2) attach a
script to run during the reset and close the app then.

I would appreciate it if one of you could assist me with either of
these ideas, or propose a better "best practice" method of logging
sessions off after being idle.

Thanks in advance,

J Wolfgang Goerlich
 
When you say, "close the app before resetting" do you mean
closing the application in any manner? I mean, if you
killed the application, would that be an acceptable way
to 'close the application'?

-M
 
Thank you for your response. Let me be more specific in what I am
looking for:
When you say, "close the app before resetting" do you mean
closing the application in any manner?

If I send a keystroke to the app such as Alt-F4, then the app closes
gracefully. There is no problem on the back-end database. If I log off
a session with the app open, then the app closes and the database is
fine.

If I end the app forcibly, say using Taskman to end its process, then
there is a lock on certain records in the database. Taking this one
step further, if I end the app by resetting a person's session, then
the behavior is like that of ending the process -- a lock occurs in
the database.

Therefore, I think that I need to either log off or send a keystroke
to the application before the session resets. Does this answer your
question?

J Wolfgang Goerlich
 
Ah. Now I understand.

I guess you could write a small vb script (or something
like that) that would send a keystroke before the client
logs out. Alternatively, you could set a logoff script
that would somehow close the application gracefully before
the session was completely reset.

-M
 
Back
Top