Defeating Citrix Inactivity Timeout?

P

PeteCresswell

I posted something like this last night via Individual.net, but can't
find the thread.... so here goes again via GoogleGroups.

We have an overnight batch job that is scheduled to run in the wee
hours of the morning.

Works a-ok in our QA environment, but not in prod.

Bottom line, I have to get up after midnight every night and nurse the
thing to completion by firing it off manually.

I VPN/RemoteDesktop to my client site PC from home and kick off the
job.

Problem is Citrix' inactivity timeout. Job runs 2+ hours.

I fall asleep, then don't wake up in time - and have to start all over
again.

I'm thinking a little MS Access app that runs on the same PC that I
RemoteDesktop into.
The little app would just keep looping and every so often raise a
MouseOver or KeyDown or some other event in the Citrix window.

I know from SendKeys() but have no clue about how to find/identify the
Citrix window and stuff events into it.

Can anybody offer a hint?
 
T

Tom van Stiphout

On Mon, 11 May 2009 06:45:41 -0700 (PDT), PeteCresswell

Are you SURE that simply because your terminal session goes to sleep
your app (running inside that session) fails? That would be highly
surprising. Typically it's the session that times out, not the apps
that run in it.

Can't the app be scheduled to run unattended on the machine itself? If
you say that's against policy let the one who set that policy get up
each night and perform this task :)

-Tom.
Microsoft Access MVP
 
P

PeteCresswell

Are you SURE that simply because your terminal session goes to sleep
your app (running inside that session) fails? That would be highly
surprising. Typically it's the session that times out, not the apps
that run in it.

It's not the terminal sesh. It's the Citrix session.

i.e. If nobody does anything in the Citrix window for N minutes, it's
as if somebody pulled the plug on the virtual PC that the Citrix sesh
uses. The screen issues a "Do something in the next N minutes or I'm
going away prompt" and then just goes "Poof" if nobody does anything.

(I don't want to even *think* about other possbilities for problems
from that scenario right now...)
Can't the app be scheduled to run unattended on the machine itself? If
you say that's against policy let the one who set that policy get up
each night and perform this task :)

Yes, and the scheduled process works a-ok in the Citrix environment
that I have Admin access to and use for QA testing.

But when the scheduled .BAT file is started in the prod Citrix
environment, it appears that MS Access is issuing one of several modal
dialogs - which, of course, just causes it to hang since there is no
user there to dismiss them.

But that's a separate issue in that I have no control over/access to
that environment.

Yes, the scheduling sb resolved ASAP, but for the here and now, this
thing has just *got* to be run in order for people to trade the next
day.

Long run, we're replacing the whole enchildada with a .NET/SQL Server
rewrite - hopefully in early August.

Some months ago this app went far, far beyond the limitations of my
one-man/ad-hoc/RAD development efforts. It started out as one of
those "So-and-So's spreadsheet is getting a little out of hand, could
you please write an MS Access app to replace it" things. Slam-dunk,
perfect-fit. MS Access app.

Since then, it's morphed into a full-blown mission-critical bond
trading system used by almost a dozen people.

I told them that and sold them on the .NET/SQL Server approach. As
much because they need the control of a real development methodology
and more than one person doing the work as bco the back end
technology.

It's being driven by a very strong-willed, extraordinarily-intelligent
person who has no clue whatsoever about the need for specs, test
cases, and testing.
She's almost sacked the "real" development team several times just
because of their insistence on the above. I'm just being driven and
driven from one day to the next. Migrate 15,000 trading accounts
into the new system using a revised DB architecture? "No need for
testing with up-to-date live data beforehand, we'll just wing it on
Friday night and go live Monday morning." "500+ changes in the app
to accomodate the new architecture and you want us to WHAT??? Parallel
test in a Pilot environment for at least a week?... NO WAY... we're
going live on Monday."

Sorry, I'm starting to rant again.... but you get the picture.

All I want to do is get to where I don't have to stay up half the
night nursing this fushluggner job and get something close to a decent
night's sleep so can cope with the rest of this debacle.


Bottom Line: Can anybody offer up a hint on how to find/identify a
Citrix window from VBA and then feed it something that will give the
illusion of user activity? I'm guessing there are a few API calls
that will do the job.
 
D

David W. Fenton

m:
i.e. If nobody does anything in the Citrix window for N minutes,
it's as if somebody pulled the plug on the virtual PC that the
Citrix sesh uses. The screen issues a "Do something in the next N
minutes or I'm going away prompt" and then just goes "Poof" if
nobody does anything.

My bet is that there is a setting to disconnect the remote user but
keep the session live, since Windows Terminal Server offers that
setup.
 
D

David W. Fenton

m:
All I want to do is get to where I don't have to stay up half the
night nursing this fushluggner job and get something close to a
decent night's sleep so can cope with the rest of this debacle.

I would require $500/hour to do it manually in the middle of the
night. If that is not enough to get them off their asses and fix the
problem, then nothing will, and I'd walk and never look back.
 
T

Tom van Stiphout

On Mon, 11 May 2009 08:37:51 -0700 (PDT), PeteCresswell

It would likely take two API calls: FindWindow, and PostMessage. See
if you can take it from there, but if not email me privately (remove
the no.spam protection) and I'll help you get a good night's sleep.
Until you get a baby...

-Tom.
Microsoft Access MVP
 
P

PeteCresswell

It would likely take two API calls: FindWindow, and PostMessage. See
if you can take it from there, but if not email me privately (remove
the no.spam protection) and I'll help you get a good night's sleep.
Until you get a baby...

I'll take that and run with it.

Thanks.

My apologies to all for the rant. It was the caffiene talking... -)
 
T

Tony Toews [MVP]

PeteCresswell said:
I posted something like this last night via Individual.net, but can't
find the thread.... so here goes again via GoogleGroups.

Didja read my suggestion somewhere else about an electrically operated
baby rocking chair with an optical mouse in the seat? It was
mentioned on the Daily WTF a while back.

Tony
 
T

Tony Toews [MVP]

PeteCresswell said:
It's being driven by a very strong-willed, extraordinarily-intelligent
person who has no clue whatsoever about the need for specs, test
cases, and testing.

Sorry, I'm starting to rant again.... but you get the picture.

And when things go wrong because of no testing then you folks get the
blame and not her.

Tony
 
P

PeteCresswell

Didja read my suggestion somewhere else about an electrically operated
baby rocking chair with an optical mouse in the seat?  It was
mentioned on the Daily WTF a while back.

Classic!

That one's a "keeper"..

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top