Solved

Vista Task Scheduler task keeps running when through.

Posted on 2011-02-24
10
674 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 44

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 44

Expert Comment

by:Jackie Man
ID: 34981688
Can you export your task as a XML file and post it back?
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

Author Comment

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

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 44

Accepted Solution

by:
Jackie Man earned 500 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 44

Expert Comment

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

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

The Service applet starts in Extended Mode by Default, with a taskpad on the left of the services pane. This view mode was introduced in XP. As I find it not very usefull, I like to use the Standard view as default, and without the Console tree. …
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

829 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