4

I login to a dedicated Windows 2003 server, under Administrator, with a remote desktop client, Microsoft RDC.

After 5 minutes of inactivity the server shuts me out and I have to reload RDC and login to the server again. This is good for security but I think this is causing problems for a Windows Schedule backup task I am running. The backup task keeps running for a while and then stops suddenly and waits for the next schedule to start again. The scheduled task runs under Administrator using the password too. I think it's stopping my backup task and logging out after 5 minutes.

First, is this likely to be the case? Second, if it is the case, how can I get around this?

UPDATED

I got around this by editing the server settings for session idle time. I did:

Start > Control Panel > Administrative Tools > Terminal Services Configuration : Right Click Connection > Properties > Click Sessions Tab : Extend Idle Timer.

enter image description here

Now I don't get logged out, my scheduled tasks run without disturbance, I'm a happy chappy!

3 Answers 3

2

There are several solutions possible. In order of my preference:

One, use a backup program that runs as a service. Even if you're logged out, it will carry on to completion. You can also install third-party tools such as FireDaemon that will 'daemonize' anything, enabling your scheduled task to run as a service.

Two, make sure that the scheduled task DOES NOT have the option "run only when logged in" selected.

Three, install a program that will automatically perform "anti-idle" for you (e.g., by simulating a key-down and key-up event every minute)

Four, ask your SysAdmin to disable the auto-logoff timer.

2
  • Thanks for your reply. I wish you answered before @leepfrog, he sent me round the long way first!!! I have actually fixed this, just now actually, my updated question reflects this. May 13, 2012 at 16:03
  • Although I shiver a bit disabling auto-logoff (having had bad experience with users keeping their sessions open indefinitely), I'm glad you fixed your problem.
    – pepoluan
    May 14, 2012 at 0:48
1

It is unlikely that this interfers with your backup. Here is why:

When the RDP session is disconnected it does not really log of your users session at the system. This is equivalent to locking your workstations screen. You can unlock it (or reconnect via RDP) and you will continue exactly where you stopped. The processes continue to run in the background. Also scheduled tasks run in the background - no matter if the user the task is running under is logged on or not.

So I believe your backup issues have another reason. You might want to check your eventlog for errors/warnings.

5
  • Actually, I thought you solved it for me but it seems not. It has got something to do with being logged out after inactivity. I have changed my backup system and it still stops the scheduled batch file process, always within 5 minutes of starting. This can only be down to my session activity period. May 13, 2012 at 3:41
  • If I'm logged in with RDC and sit and wait 5 minutes, an alert pops up on the screen warning me something like this "Due to inactivity, you will be logged out in 2 minutes, press any key to continue this session". So I don't think it's locking the screen, I think it's actually logging me out. May 13, 2012 at 3:45
  • The configuration of Remote Desktop Service actually has 2 timers of anti-idle: After a configurable amount of time, the session will be disconnected or logged out. The second timer measures how long a session has been disconnected, and will force a logoff after it times out.
    – pepoluan
    May 13, 2012 at 9:23
  • pepoluan is correct, there is indeed this setting which logs you off automatically, but it is disabled by default
    – leepfrog
    May 13, 2012 at 10:21
  • I fixed it. Start > Control Panel > Administrative Tools > Terminal Services Configuration : Right Click Connection > Click Sessions Tab : Extend Idle Timer. It was totally logging me out and canceling my scheduled tasks, so I have to disagree with your answer, slightly. My scheduled tasks run under my username and password. If that username can only have 5 minutes idle time, then that user session will be destroyed, whether it's me or a task. May 13, 2012 at 16:00
1

To solve this you need to extend the session's idle time. You can do this by going to:

Start > Control Panel > Administrative Tools > Terminal Services Configuration : Right Click Connection > Sessions Tab

And then altering the idle timer settings to suit your needs. I changed mine to have an idle of 1 day before disconnecting and logging out.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .