Tech Support > Microsoft Windows > Task Scheduler - task still running
Task Scheduler - task still running
Posted by Gary on December 14th, 2005


(XP Pro)
I have a simple task that I run through the Task Scheduler. It's a VBS
script that Runs a program, sleeps for a few minutes, then kills that
program and exits. The script appears to have run properly to completion.
Yet the Scheduled Tasks list shows the task as Status:Running.

Why did the task not terminate?

Thanks.

Gary


Posted by Pegasus \(MVP\) on December 14th, 2005



"Gary" <GAry> wrote in message news:#IuU8sOAGHA.2036@TK2MSFTNGP14.phx.gbl...
> (XP Pro)
> I have a simple task that I run through the Task Scheduler. It's a VBS
> script that Runs a program, sleeps for a few minutes, then kills that
> program and exits. The script appears to have run properly to completion.
> Yet the Scheduled Tasks list shows the task as Status:Running.
>
> Why did the task not terminate?
>
> Thanks.
>
> Gary


This is something that only you can answer, by looking
at the output from the scheduled job. Embed it in a batch
file like so:

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
wscript c:\tools\YourScript.vbs 1>>c:\test.log 2>c:\test.err
echo Script error level=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log

Now examine the two log files and all will become clear!



Similar Posts