Re: Task Scheduler Fails, But Not All the Time



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.

.



Relevant Pages

  • Re: MS Scheduled Task
    ... I do get the following test.log after moving the bat file to my C ... echo %date% %time% Start of task> c:\test.log ... A test.log does not get created when I run it via the scheduler. ... Post your version of the batch file here. ...
    (microsoft.public.windowsxp.general)
  • 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: errors running scheduled tasks
    ... Since you're invoking a batch file, ... my (temp/test) yourtask.exe file is c:\testx\test.bat ... @echo off ... if i open the task scheduler and watch it at the same time that it ...
    (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)