Re: Task Scheduler Fails, But Not All the Time




Pegasus (MVP) wrote:
"Dennis Q. Wilson" <DennisQWilson@xxxxxxxxx> wrote in message
news:1145428897.441914.251150@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Pegasus (MVP) wrote:
"Dennis Q. Wilson" <DennisQWilson@xxxxxxxxx> wrote in message
news:1145375512.313090.28040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm running a clean install of Windows XP Pro with Service Pack 2, and
I wish to use Task Scheduler to run a certain program at various times
each week (an ATI Multimedia Center video capture, for what it's
worth).

Most tasks complete just fine, but not all -- some never start. When
I
check the "Scheduled Tasks" folder following such a failure, what I
invariably find is that the "Next Run Time" pertaining to the failed
tasks has mysteriously jumped many days ahead.

For example, if a program is scheduled to run every Wednesday at 8 p.m
beginning April 12, I might check it the next morning to find that,
not
only did it not happen, but now the "Next Run Time" isn't set to April
19, but something like April 23, which is MORE than seven days ahead,
and isn't even a Wednesday!

To the best of my ability to double-check, the task properties have
been set correctly. And as I said, this only happens with SOME of the
scheduled video captures -- the rest execute as, well, scheduled.

Does anyone know what might be happening here?


Before ***assuming*** that the task never starts, ***prove***
it beyond doubt that it does not, by embedding your command
into the batch file below, then scheduling that batch file:

@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 examine the two log files. I suspect they will show
that the task DID start but that it failed for some perfectly
good reason.

Do remember that I said, "Most tasks complete just fine, but not all --
some never start." That being the case, I created ***several*** of
those batch files and scheduled them to run at different times, because
just trying it once wouldn't ***prove*** much.

Five times the batch files executed properly; twice, not at all, and
with no log files produced. And again in the case of the two failed
trials, the Start Time mysteriously jumped nine days ahead.


I remember your words well but with the experience of a large
number of posts on the Task Scheduler I have learned to
question such remarks. In most Task Scheduler posts the
OP claims that some or all of the tasks fail to run when
in fact they do run but he looked in the wrong place.

I note that you reported in your first post that some tasks started
but never finished. You did not report this phenomenon for your
subsequent tests. This makes me wonder what has changed.

Nothing changed. Where I wrote "Most tasks complete just fine, but not
all -- some never start," I meant that some not only don't complete,
they never start. In other words, my Scheduled Tasks have only two
results: successful completion and failure to launch.

But I also forgot to mention that when "Next Run Time" mysteriously
jumps forward, so does the Starting Time. The "Last Run Time" keeps
displaying "Never."

I'm also curious about the logs kept in the Task Scheduler's own
log files, and in the Windows Event logger. Did you check them?

Yeah, the logs bear me out. There's no mention of the tasks which fail
to launch.

Lastly I would run my proposed batch file with some stock standard
Windows command, e.g. attrib c:\*.* >> c:\test.log, in order to
eliminate any possible interference from a misbehaving third-party
application.

I anticipated you there when running the tests you suggested. Same
result: most run, but not all. I'm still totally mystified.

.



Relevant Pages

  • Re: Task Scheduler Fails, But Not All the Time
    ... into the batch file below, ... echo %date% %time% Start of task> c:\test.log ... Now examine the two log files. ... In most Task Scheduler posts the ...
    (microsoft.public.windowsxp.general)
  • Re: Dayly backup fails to run after first day
    ... There's no need to run batch file. ... > examine the two log files each time. ... > Now invoke the batch file several times with the Task Scheduler, ...
    (microsoft.public.windows.server.general)
  • Re: Dayly backup fails to run after first day
    ... I urge you to embed it in a batch file like so: ... examine the two log files each time. ... Now invoke the batch file several times with the Task Scheduler, ...
    (microsoft.public.windows.server.general)
  • Re: Daily backup fails to run after first day
    ... because the scheduled job runs once but fails the ... Prompt as under the Task Scheduler? ... There's no need to run batch file. ... >> examine the two log files each time. ...
    (microsoft.public.windows.server.general)
  • Re: task scheduler
    ... When I sent you a copy of the batch file i might have ... @echo offrem SCT Payment Client Startup for Banner Webrem AUDIT TRAIL: ... rem SCT Payment Client Startup for Banner Webrem AUDIT TRAIL: ... Task that run under the Task Scheduler are designed ...
    (microsoft.public.windowsxp.general)

Loading