[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Vista Task Scheduler task keeps running when through.

Posted on 2011-02-24
10
Medium Priority
?
678 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 49

Expert Comment

by:Jackie Man
ID: 34977714
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
ID: 34981532
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 49

Expert Comment

by:Jackie Man
ID: 34981688
Can you export your task as a XML file and post it back?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:BobArnett
ID: 34981768
Sure thing. TakeOutTrash.xml
0
 
LVL 49

Expert Comment

by:Jackie Man
ID: 34982779
How do you create the WinBatch file as indicated in your xml file?
0
 

Author Comment

by:BobArnett
ID: 34983521
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 49

Accepted Solution

by:
Jackie Man earned 2000 total points
ID: 34985556
Are you using the latest version of winbatch, I.e. 2011A?
0
 

Author Comment

by:BobArnett
ID: 35002147
2010A is the version I'm using.
0
 

Author Closing Comment

by:BobArnett
ID: 35002245
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 49

Expert Comment

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

So who is this article for? If you are like most of the computer users out there, you probably only realize the meaning of 'System maintenance' after something goes wrong. This article is for you if you care about keeping your system working opti…
There are many reasons a PC runs slower than when it was new, ranging from malicious software intended to mess things up to simple general Windows use.  Your PC performance may slowly degrade over time without you noticing but when you buy a PC from…
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

656 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