Link to home
Start Free TrialLog in
Avatar of BobArnett
BobArnettFlag for United States of America

asked on

Vista Task Scheduler task keeps running when through.

I have created a task in Windows Vista Task Scheduler and it runs fine but even after it has completed the two actions, the status stays as "Running". How can I get it to recognize it is done.
Avatar of Jackie Man
Jackie Man
Flag of Hong Kong image

1. Right click the task that you have created.
2. In the Actions tab of the task, in  the Add arguments (optional) value, you should have added an argument of /c when means that the task will try to run repeatedly. If you remove the /c argument, the status will not be shown as Running after the task has been run.

An example is shown below for your reference.

 
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.1" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Author>Jackie</Author>
    <Description>¿¿¿ Google ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿,Google ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿,¿¿¿¿¿¿¿¿¿,¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ Google ¿¿¿¿¿¿¿¿,¿¿¿¿¿¿¿¿¿¿¿</Description>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2010-10-20T13:30:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>SYSTEM</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <IdleSettings>
      <Duration>PT0S</Duration>
      <WaitTimeout>PT1048560S</WaitTimeout>
      <StopOnIdleEnd>false</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>PT3600S</ExecutionTimeLimit>
    <Priority>5</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>C:\Program Files\Google\Update\GoogleUpdate.exe</Command>
      <Arguments>/c</Arguments>
    </Exec>
  </Actions>
</Task>

Open in new window

Avatar of BobArnett

ASKER

Although your example seems to be quite thorough, I'm not sure how that applies to my task since I don't find anything resembling that sort of format in my Vista Task Scheduler task. I did right-click on the task, selected Properties and then the Action tab. I then checked on both of the actions and  neither one has a "\c" argument. One has the name of a file that is passed on to the program being run (wav file to play) and the other action is just to display a message. I even deleted the second action but that made no difference. I'm now wondering if the problem lies in the the first action which is running a WinBatch script (if you're familiar with that) that plays a specified wav file. Perhaps WinBatch is not letting go (stopping) so it keeps appearing to Task Scheduler to be still running. I'll also try to contact them to see if they know of any problem with that.
Can you export your task as a XML file and post it back?
Sure thing. TakeOutTrash.xml
How do you create the WinBatch file as indicated in your xml file?
The program WinBatch is a:
"macro scripting language that provides batch automation"
available at
http://www.winbatch.com/ .
I've been using it for years and even have had Task Scheduler run them before. I also now have tried changing the setting for "Stop if the task runs more than ______" to  "3 minutes" but, alas, that also made no difference.
ASKER CERTIFIED SOLUTION
Avatar of Jackie Man
Jackie Man
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
2010A is the version I'm using.
Oops. I just realized from your prompting that although I had received version 2010A of WinBatch a while back, I had never installed the upgrade. So, having now done that, the Task runs (and quits properly). Thanks for the direction.
Glad to know that you have the problem solved. Cheers!