Task Scheduler Stopped Working

F

FlyingBlind

I'm having trouble with the Task Scheduler XP Professional SP 2 installed.

I had several tasks scheduled that worked for months (years even) and then
suddenly they all stopped. No new software installed - can't think of what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've restarted it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The file
contains only the line "Echo Test Scheduler". When I schedule the task to
run, a CMD.EXE entry appears in the Task Manager - Processes tab, but the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to Interact
with Desktop" options are both checked for the Task Scheduler Service.

I have alternately scheduled an AT command and a SCHTASKS command from the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and when
the time arrived the task shows as RUNNING, but nothing appears. The last
result code is 0x0.

I have searched online (and this forum) but can't find any problems that are
similar. I am an experienced computer professional and can edit the registry
if needed. Does anyone have any ideas?
 
P

Pegasus [MVP]

FlyingBlind said:
I'm having trouble with the Task Scheduler XP Professional SP 2 installed.

I had several tasks scheduled that worked for months (years even) and then
suddenly they all stopped. No new software installed - can't think of
what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've restarted it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The file
contains only the line "Echo Test Scheduler". When I schedule the task to
run, a CMD.EXE entry appears in the Task Manager - Processes tab, but the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to Interact
with Desktop" options are both checked for the Task Scheduler Service.

I have alternately scheduled an AT command and a SCHTASKS command from the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and when
the time arrived the task shows as RUNNING, but nothing appears. The last
result code is 0x0.

I have searched online (and this forum) but can't find any problems that
are
similar. I am an experienced computer professional and can edit the
registry
if needed. Does anyone have any ideas?

What does the Task Scheduler log file report? What about the event viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log
 
J

Jose

I'm having trouble with the Task Scheduler XP Professional SP 2 installed..

I had several tasks scheduled that worked for months (years even) and then
suddenly they all stopped.  No new software installed - can't think of what
would make them stop working.  

I checked the Task Scheduler Service - it is running.  I've restarted it
several times, no change.

I deleted all of my tasks and tested with a simple batch file:  The file
contains only the line "Echo Test Scheduler".  When I schedule the taskto
run, a CMD.EXE entry appears in the Task Manager - Processes tab, but the
window does not appear on the desktop.  

I have verified that "Local System Account" and "Allow Service to Interact
with Desktop" options are both checked for the Task Scheduler Service.

I have alternately scheduled an AT command and a SCHTASKS command from the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and when
the time arrived the task shows as RUNNING, but nothing appears.  The last
result code is 0x0.

I have searched online (and this forum) but can't find any problems that are
similar.  I am an experienced computer professional and can edit the registry
if needed.  Does anyone have any ideas?

Plenty of ideas for people trying to get started with ST and not all
apply to you but some are general troubleshooting methods.

I would start by clearing out your log file, start with a simple task,
get it working, then test your afflicted tasks and use the log file (I
will tell you where it is) for troubleshooting. It sounds like your
task is running, but not under your account so you can't see it. The
log file will tell you what is going on.

Not so popular advice from me to troubleshoot STs:

It is strongly suggested that the task be assigned to a user that has
a password (not the Administrator), so create a new user with a
password just for tasks or add a password to your account if needed.
You can temporarily assign yourself a PW to test and worry about this
later.

If you don't use an account with a password, you will get an error
trying to create the task. It will still be created, but will not run
properly.

There is a way around this, but get this working first to be sure your
mechanism is not afflicted.

Stop the Task Scheduler service.

Delete or rename the probably cluttered ST log file which is here:

c:\windows\schedlgu.txt

Restart the Task Scheduler service to create a new log.

Browse to the c:\windows\tasks folder to see all your tasks and look
at the log file.

The Next Run Time, Last Run Time, Status and Last Results columns are
of interest. You can also click Advanced and view the log.

Choose to Add Scheduled Task. Create a new task to run Command Prompt
once, now. If you don't have a PW, you will get an error trying to
create it (more on that later). It will still be created, but will
never run. There is no need to create a batch file for this simple
test.

Right click the new Command Prompt task and choose Run and a command
window should open immediately. If not, something is wrong. If yes,
your mechanism is sound. Look in the log file to see your results.

You know how to remove the log now, so that is up to you. Be sure the
Task Scheduler service is running again.

Try to Run your new or troublesome task, observe the columns, and the
log.

If your task fails to run manually, the errors in the log file are the
clues to what to do next.
 
F

FlyingBlind

Pegasus said:
What does the Task Scheduler log file report? What about the event viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ]. Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).
 
P

Pegasus [MVP]

FlyingBlind said:
Pegasus said:
"FlyingBlind" <[email protected]> said this in news
item


What does the Task Scheduler log file report? What about the event
viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these
lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht
he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ].
Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).

What is the exact command you're trying to execute?
 
L

Lem

FlyingBlind said:
Pegasus said:
What does the Task Scheduler log file report? What about the event viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ]. Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).

What happens when you right click on the entry for your "real" job in
the Scheduled Tasks window and select "Run"? What does the log entry
just above ***** Most recent entry is above this line ***** say?

When you tried using the AT command, did you use the /interactive switch
(I assume you did, but ...)?
 
P

Pegasus [MVP]

FlyingBlind said:
Pegasus said:
"FlyingBlind" <[email protected]> said this in news
item


What does the Task Scheduler log file report? What about the event
viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these
lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht
he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ].
Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).

Your reply is actually somewhat confusing. At the start, when you say "log
file", you appear to refer to the log file generated by the batch file I
proposed. At the end, when you say "log file", you seem to talk about the
Task Scheduler's internal log file. Please clarify.
 
F

FlyingBlind

The first Log File referes to the Test.log created by the redirect command in
the batch file.

The second reference to log file is the Task Scheduler Log file.

Pegasus said:
FlyingBlind said:
Pegasus said:
"FlyingBlind" <[email protected]> said this in news
item
I'm having trouble with the Task Scheduler XP Professional SP 2
installed.

I had several tasks scheduled that worked for months (years even) and
then
suddenly they all stopped. No new software installed - can't think of
what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've restarted
it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The
file
contains only the line "Echo Test Scheduler". When I schedule the task
to
run, a CMD.EXE entry appears in the Task Manager - Processes tab, but
the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to
Interact
with Desktop" options are both checked for the Task Scheduler Service.

I have alternately scheduled an AT command and a SCHTASKS command from
the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and
when
the time arrived the task shows as RUNNING, but nothing appears. The
last
result code is 0x0.

I have searched online (and this forum) but can't find any problems
that
are
similar. I am an experienced computer professional and can edit the
registry
if needed. Does anyone have any ideas?

What does the Task Scheduler log file report? What about the event
viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these
lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht
he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ].
Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).

Your reply is actually somewhat confusing. At the start, when you say "log
file", you appear to refer to the log file generated by the batch file I
proposed. At the end, when you say "log file", you seem to talk about the
Task Scheduler's internal log file. Please clarify.

.
 
F

FlyingBlind

The same behavior whether the timer kicks it off or I initiate the run by
right-clicking on it and requesting RUN.

Yes I used the /interactive switch on the AT command

Lem said:
FlyingBlind said:
Pegasus said:
"FlyingBlind" <[email protected]> said this in news item
I'm having trouble with the Task Scheduler XP Professional SP 2 installed.

I had several tasks scheduled that worked for months (years even) and then
suddenly they all stopped. No new software installed - can't think of
what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've restarted it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The file
contains only the line "Echo Test Scheduler". When I schedule the task to
run, a CMD.EXE entry appears in the Task Manager - Processes tab, but the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to Interact
with Desktop" options are both checked for the Task Scheduler Service.

I have alternately scheduled an AT command and a SCHTASKS command from the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and when
the time arrived the task shows as RUNNING, but nothing appears. The last
result code is 0x0.

I have searched online (and this forum) but can't find any problems that
are
similar. I am an experienced computer professional and can edit the
registry
if needed. Does anyone have any ideas?
What does the Task Scheduler log file report? What about the event viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ]. Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).

What happens when you right click on the entry for your "real" job in
the Scheduled Tasks window and select "Run"? What does the log entry
just above ***** Most recent entry is above this line ***** say?

When you tried using the AT command, did you use the /interactive switch
(I assume you did, but ...)?

--
Lem

Apollo 11 - 40 years ago:
http://www.nasa.gov/mission_pages/apollo/40th/index.html
.
 
P

Pegasus [MVP]

In other words: The Task Scheduler did not stop working because your test
shows it works at least for the test batch file. Now let's see the exact
command you're trying to execute.

Note also that tasks invoked with at.exe run under the System account. Any
such task will be invisible to your current foreground session. To make it
visible you *must* get it to run under the same account as the foreground
session and you *must* use a non-blank password. This means that you must
use the GUI Task Scheduler facility or schtasks.exe to create the task.
At.exe is not suitable.

The above implies that there is a contradiction in your original post. If
you used at.exe to schedule your tasks then you could not possibly have seen
their output for "months or years" (your words). Can you clarify this point?


FlyingBlind said:
The first Log File referes to the Test.log created by the redirect command
in
the batch file.

The second reference to log file is the Task Scheduler Log file.

Pegasus said:
"FlyingBlind" <[email protected]> said this in news
item
:



"FlyingBlind" <[email protected]> said this in
news
item
I'm having trouble with the Task Scheduler XP Professional SP 2
installed.

I had several tasks scheduled that worked for months (years even)
and
then
suddenly they all stopped. No new software installed - can't think
of
what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've
restarted
it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The
file
contains only the line "Echo Test Scheduler". When I schedule the
task
to
run, a CMD.EXE entry appears in the Task Manager - Processes tab,
but
the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to
Interact
with Desktop" options are both checked for the Task Scheduler
Service.

I have alternately scheduled an AT command and a SCHTASKS command
from
the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and
when
the time arrived the task shows as RUNNING, but nothing appears.
The
last
result code is 0x0.

I have searched online (and this forum) but can't find any problems
that
are
similar. I am an experienced computer professional and can edit the
registry
if needed. Does anyone have any ideas?

What does the Task Scheduler log file report? What about the event
viewer?
Does the account used for the scheduled task have a non-blank
password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these
lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.


I tested with the redirect and the log file is created as expected.
The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact
witht
he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The
latest
data is also embedded in the middle of the file, above an asterisk
labeled
remark that says [ ***** Most recent entry is above this line ***** ].
Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).

Your reply is actually somewhat confusing. At the start, when you say
"log
file", you appear to refer to the log file generated by the batch file I
proposed. At the end, when you say "log file", you seem to talk about the
Task Scheduler's internal log file. Please clarify.

.
 
F

FlyingBlind

Thanks Jose - I deleted the log file as you suggested - it's much easier to
read now, thank you.

I also implemented the task as you suggested and used the cmd.exe as the
target of the RUN field. The results are that the job shows RUNNING in the
status field, the Last Result is 0x0 and the log shows "Test.job" (cmd.exe)
Started and then the date/time stamp. That's it. It's still running, but no
command prompt window is displayed.

I tested this on another machine and indeed the command prompt window shows
up. As htere are no errors in the log, I'm not sure what else to relay. Any
ideas?
 
F

FlyingBlind

In an attempt to disaginose the problem, I was trying both the GUI and manual
command prompt methods. It appears I've gotten the same results via both
ways - that tells me (maybe not you) something.

I haven't really gotten any useful help from your posts, other than a dose
of self-important attitude. Feel free to focus on other's problems, and give
THEM your MVP treatment. I don't need it.

Pegasus said:
In other words: The Task Scheduler did not stop working because your test
shows it works at least for the test batch file. Now let's see the exact
command you're trying to execute.

Note also that tasks invoked with at.exe run under the System account. Any
such task will be invisible to your current foreground session. To make it
visible you *must* get it to run under the same account as the foreground
session and you *must* use a non-blank password. This means that you must
use the GUI Task Scheduler facility or schtasks.exe to create the task.
At.exe is not suitable.

The above implies that there is a contradiction in your original post. If
you used at.exe to schedule your tasks then you could not possibly have seen
their output for "months or years" (your words). Can you clarify this point?


FlyingBlind said:
The first Log File referes to the Test.log created by the redirect command
in
the batch file.

The second reference to log file is the Task Scheduler Log file.

Pegasus said:
"FlyingBlind" <[email protected]> said this in news
item


:



"FlyingBlind" <[email protected]> said this in
news
item
I'm having trouble with the Task Scheduler XP Professional SP 2
installed.

I had several tasks scheduled that worked for months (years even)
and
then
suddenly they all stopped. No new software installed - can't think
of
what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've
restarted
it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The
file
contains only the line "Echo Test Scheduler". When I schedule the
task
to
run, a CMD.EXE entry appears in the Task Manager - Processes tab,
but
the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to
Interact
with Desktop" options are both checked for the Task Scheduler
Service.

I have alternately scheduled an AT command and a SCHTASKS command
from
the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and
when
the time arrived the task shows as RUNNING, but nothing appears.
The
last
result code is 0x0.

I have searched online (and this forum) but can't find any problems
that
are
similar. I am an experienced computer professional and can edit the
registry
if needed. Does anyone have any ideas?

What does the Task Scheduler log file report? What about the event
viewer?
Does the account used for the scheduled task have a non-blank
password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these
lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.


I tested with the redirect and the log file is created as expected.
The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact
witht
he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The
latest
data is also embedded in the middle of the file, above an asterisk
labeled
remark that says [ ***** Most recent entry is above this line ***** ].
Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).


Your reply is actually somewhat confusing. At the start, when you say
"log
file", you appear to refer to the log file generated by the batch file I
proposed. At the end, when you say "log file", you seem to talk about the
Task Scheduler's internal log file. Please clarify.

.
.
 
P

Pegasus [MVP]

FlyingBlind said:
In an attempt to disaginose the problem, I was trying both the GUI and
manual
command prompt methods. It appears I've gotten the same results via both
ways - that tells me (maybe not you) something.

We seem to speak a different language, with you reading words between the
lines that were never there. Let me summarise what I said before.
- Your scheduled tasks do run. Your report confirms it.
- If you want their output to be visible in a foreground session then you
must invoke them with schtasks.exe or with the TS GUI, using the same
account/password as the foreground session.
- The password must not be blank.
- You need to post the exact command you're trying to run.
- I do not understand how your at-generated tasks could have generated a
foreground output and I would very much like you to explain how you did it
so that I could learn something new.
 
L

Lem

OK, but what does the scheduled task log say when you run the "real" job?

AFAIK, (a) if you create a task with the Task Scheduler GUI or with
schtasks, the interactive window will only be visible if the user that
is the "owner" of the task is logged on, but (b) tasks created with the
AT command, that RunAs NTAUTHORITY\SYSTEM, should be visible to the
logged on user if the /INTERACTIVE switch is specified.

I just entered the following in a Command Prompt window:

at 16:51 /INTERACTIVE %systemroot%\system32\calc.exe

This created job AT1 that showed in the Scheduled Tasks GUI, and at the
appointed time, the calculator window popped up. I don't know if it
makes any difference (I doubt it), but the user that was logged on for
this test has administrative rights.


The same behavior whether the timer kicks it off or I initiate the run by
right-clicking on it and requesting RUN.

Yes I used the /interactive switch on the AT command

Lem said:
FlyingBlind said:
:

"FlyingBlind" <[email protected]> said this in news item
I'm having trouble with the Task Scheduler XP Professional SP 2 installed.

I had several tasks scheduled that worked for months (years even) and then
suddenly they all stopped. No new software installed - can't think of
what
would make them stop working.

I checked the Task Scheduler Service - it is running. I've restarted it
several times, no change.

I deleted all of my tasks and tested with a simple batch file: The file
contains only the line "Echo Test Scheduler". When I schedule the task to
run, a CMD.EXE entry appears in the Task Manager - Processes tab, but the
window does not appear on the desktop.

I have verified that "Local System Account" and "Allow Service to Interact
with Desktop" options are both checked for the Task Scheduler Service.

I have alternately scheduled an AT command and a SCHTASKS command from the
command line - same results.

Referring to the Task Scheduler window, I scheduled my test task and when
the time arrived the task shows as RUNNING, but nothing appears. The last
result code is 0x0.

I have searched online (and this forum) but can't find any problems that
are
similar. I am an experienced computer professional and can edit the
registry
if needed. Does anyone have any ideas?
What does the Task Scheduler log file report? What about the event viewer?
Does the account used for the scheduled task have a non-blank password?

Scheduling a batch file with the line
echo Test scheduler
is of limited use. A much more revealing test would consist of these lines:

@echo off
echo %date% %time% %UserName% >> c:\test.log

.

I tested with the redirect and the log file is created as expected. The
results remain 0x0 and the status is blank.

The application I want to run requires a window to open to interact witht he
user. Any idea why it won't generate a window?

As for the log file: it says

"test.job" (test.bat)
Started 12/21/2009 11:52:19 AM
"test.job" (test.bat)
Finished 12/21/2009 11:52:24 AM
Result: The task completed with an exit code of (0).

It's also littered with User Feed Synchronization messages - The latest
data is also embedded in the middle of the file, above an asterisk labeled
remark that says [ ***** Most recent entry is above this line ***** ]. Weird.

Nothing in the event viewer for this time.

The account has a password and it's supplied witht eh task is built
(scheduled).
What happens when you right click on the entry for your "real" job in
the Scheduled Tasks window and select "Run"? What does the log entry
just above ***** Most recent entry is above this line ***** say?

When you tried using the AT command, did you use the /interactive switch
(I assume you did, but ...)?

--
Lem

Apollo 11 - 40 years ago:
http://www.nasa.gov/mission_pages/apollo/40th/index.html
.
 
L

Lem

Pegasus [MVP] wrote:
..
- I do not understand how your at-generated tasks could have generated a
foreground output and I would very much like you to explain how you did
it so that I could learn something new.

Mine did:

I entered the following in a Command Prompt window:

at 16:51 /INTERACTIVE %systemroot%\system32\calc.exe

This created job AT1 that showed in the Scheduled Tasks GUI, and at the
appointed time, the calculator window popped up. I don't know if it
makes any difference (I doubt it), but the user that was logged on for
this test has administrative rights.
 
P

Pegasus [MVP]

Lem said:
Pegasus [MVP] wrote:
.

Mine did:

I entered the following in a Command Prompt window:

at 16:51 /INTERACTIVE %systemroot%\system32\calc.exe

This created job AT1 that showed in the Scheduled Tasks GUI, and at the
appointed time, the calculator window popped up. I don't know if it makes
any difference (I doubt it), but the user that was logged on for this test
has administrative rights.

I was not aware of the /interactive switch - thanks for the update. As you
said before, at.exe jobs run under the System account. This account has no
access to networked resources. We don't yet know what exactly the OP tries
to do with his scheduled job but an inability to access data on a network
share might well be the underlying cause for his problem. Capturing both the
standard and the error output in a log file would reveal it.
 
J

Jose

Thanks Jose - I deleted the log file as you suggested - it's much easier to
read now, thank you.

I also implemented the task as you suggested and used the cmd.exe as the
target of the RUN field.  The results are that the job shows RUNNING inthe
status field, the Last Result is 0x0 and the log shows "Test.job" (cmd.exe)
Started and then the date/time stamp.  That's it.  It's still running, but no
command prompt window is displayed.

I tested this on another machine and indeed the command prompt window shows
up.  As htere are no errors in the log, I'm not sure what else to relay..  Any
ideas?

When you set up the ST it wants a user and preferably one with a
password.

Are the credentials you are using when you log in to XP to do your
troubleshooting the same as the credentials used to set up the ST?

I would work on figuring out why the CMD is not working the way we
think it should - it is a simple easy test and should work every
time. Get that working first, then apply your knowledge to your
afflicted task.

Your sync errors - are you doing anything with RSS feeds? This
probably has nothing to do with your ST issue, but nothing in the log
file should defy explanation. If that also needs figuring out, we
will figure it out.

Start a fresh log. Run the CMD task manually and even if you don't
see the window open and it shows running, copy/paste the log back here
for analysis. Also, when it shows running with no window, you should
see it running in Task Manager (CTRL-ALT-DEL) - is the User Name the
same as your Login name?
 
L

Lem

Pegasus said:
I was not aware of the /interactive switch - thanks for the update. As
you said before, at.exe jobs run under the System account. This account
has no access to networked resources. We don't yet know what exactly the
OP tries to do with his scheduled job but an inability to access data on
a network share might well be the underlying cause for his problem.
Capturing both the standard and the error output in a log file would
reveal it.

Exactly. Which is why we both asked for the output of the log when he
ran his desired task rather than just the test task.
 
F

FlyingBlind

I'll do this today. I'm away from the the afflicted machine right now, but I
can tell you when I ran the task (to start calc.exe) it did show up in the
Processes tab of the Task Manager. The log entry showed the ST as started.
Then it just ran and no more log entries were entered until I killed the task
from the Task Manager - at which point an entry in the log was made that the
process was ended (RC = 1).

I also set up the ST to have multiple start times with an execution time
limit of 1 minute (every minute it starts and then one minute later it ends).
It starts and stops (and appears in Task Manager Processes) as expected,
multiple times. The log shows each start and then stop when the execution
time limit is reached - it suggests that I revisit the execution time to
increase it.

The userid has a password (and it was supplied) but the name is different
from the logon. Of course, when setting up the task, just to test I tried to
set up a task with the login name rather than userid and I got a user not
found error (I expected this).
 
J

Jose

I'll do this today.  I'm away from the the afflicted machine right now,but I
can tell you when I ran the task (to start calc.exe) it did show up in the
Processes tab of the Task Manager.  The log entry showed the ST as started.  
Then it just ran and no more log entries were entered until I killed the task
from the Task Manager - at which point an entry in the log was made that the
process was ended (RC = 1).

I also set up the ST to have multiple start times with an execution time
limit of 1 minute (every minute it starts and then one minute later it ends).
 It starts and stops (and appears in Task Manager Processes) as expected,
multiple times.  The log shows each start and then stop when the execution
time limit is reached - it suggests that I revisit the execution time to
increase it.

The userid has a password (and it was supplied) but the name is different
from the logon.  Of course, when setting up the task, just to test I tried to
set up a task with the login name rather than userid and I got a user not
found error (I expected this).

Sounds like it is working fine.

If you are still having trouble with your specific task, post up the
Run line specific to your task.
 

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