Solved

Vista Task Scheduler task keeps running when through.

Posted on 2011-02-24
10
671 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:BobArnett
  • 5
  • 5
10 Comments
 
LVL 41

Expert Comment

by:Jackie Man
Comment Utility
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

0
 

Author Comment

by:BobArnett
Comment Utility
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.
0
 
LVL 41

Expert Comment

by:Jackie Man
Comment Utility
Can you export your task as a XML file and post it back?
0
 

Author Comment

by:BobArnett
Comment Utility
Sure thing. TakeOutTrash.xml
0
 
LVL 41

Expert Comment

by:Jackie Man
Comment Utility
How do you create the WinBatch file as indicated in your xml file?
0
Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

 

Author Comment

by:BobArnett
Comment Utility
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.
0
 
LVL 41

Accepted Solution

by:
Jackie Man earned 500 total points
Comment Utility
Are you using the latest version of winbatch, I.e. 2011A?
0
 

Author Comment

by:BobArnett
Comment Utility
2010A is the version I'm using.
0
 

Author Closing Comment

by:BobArnett
Comment Utility
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.
0
 
LVL 41

Expert Comment

by:Jackie Man
Comment Utility
Glad to know that you have the problem solved. Cheers!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hi All Just a quick one for everybody. I was recently looking into setting the default User Account Picture for all my vista clients within the network but on closer inspection the group policy setting only allows you to set the default pictur…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now