scheduled task never run on RDP?

G

Guest

I am able to run an already-created scheduled task from the RDP (remote
desktop) by right-click a task, then select run. Is it true that no matter
how the task is set-up, we could only interact with it from the console, but
never on a remote desktop? I was made to believe (based on experience) that
I an never see what is going on (with the task I started via a scheduler)
unless I am sitting in front of the console, true or not?

Query 2: If a scheduled task is configured to run under a certain Domain
Account, will or could we make this task to run if the console is logon as a
Local user when the computer starts up?

Query 3: Excuse me if I were repeating. Assume a scheduled task is
configured to run under a certain Domain Account, and when the computer
starts up, assume the user signs in using a different Domain Account. My
experience says, the task will run in the background. (true?). Now what
happen if I logoff at the console and logon as a local user (non-Domain
user)? Will any tasks run on the scheduled hour?
 
G

Guest

<quote>To watch a task execute, you must be logged on under
the same account as the account that is used for the scheduled task.</quote>
agree
<quote> Whether your current session is a console or an RDP session is
irrelevant</quote> Maybe you've misread my question. I'd better put up the
question differently: is there any way I could monitor an automated scheduled
task via a RDP session? Monitoring means to be able to interact with the
program as required and/or break the running code when required (but via a
RDP sesssion).
 
P

Pegasus \(MVP\)

You can monitor a scheduled task via a console or RDP
session if
a) you log on first under the same account as used by the
scheduled task, and
b) the scheduled task starts after you have completed
the logon process.

The usual method to monitor a scheduled task is by
placing its commands into a batch file, then collecting
the standard and error output from each command into
separate log files.
 
G

Guest

Thanks. Unless I still mis-understand you, apparently you've seen an
AUTOMATED scheduled task to run on remote desktop (which I have never). Tell
you more exactly, our many scheduled tasks are running 7/24. We normally
leave the console signed on at all time. According to what you wrote, I
should try this:
1) log off the console
2) at another computer, fire up remote desktop, connect it the machine that
runs the scheduled tasks, using the same account as those scheduled tasks are
running under. It seems you said I will then be able to monitor it.

I shall try that to verify it later.

Yes, what you suggest is what is already in use. We make use of emails,
logfiles and other tools to monitor automated tasks. But sometimes I do need
to watch what's going on, especially when it looks like a task stops due to
an unexpected error.
 
P

Pegasus \(MVP\)

See below.

ykffc said:
Thanks. Unless I still mis-understand you, apparently you've seen an
AUTOMATED scheduled task to run on remote desktop (which I have never). Correct.

Tell you more exactly, our many scheduled tasks are running 7/24. We normally
leave the console signed on at all time. According to what you wrote, I
should try this:
1) log off the console
Do your initial test while logged on at the console.
2) at another computer, fire up remote desktop, connect it the machine that
runs the scheduled tasks, using the same account as those scheduled tasks are
running under. It seems you said I will then be able to monitor it.
Yes. But as I said, I have come across some cases where this method did not
work.
I shall try that to verify it later.

Yes, what you suggest is what is already in use. We make use of emails,
logfiles and other tools to monitor automated tasks. But sometimes I do need
to watch what's going on, especially when it looks like a task stops due to
an unexpected error.
Not necessarily. You should try this:

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
c:\Tools\YourTask.exe 1>>c:\test.log 2>c:\test.err
echo ErrorLevel of c:\Tools\YourTask.exe=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Now have a look at your log files and you will be able to see
why the task stops, because all output is captured immediately.
 

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