Task Scheduler Error

I have a Windows 7 where there are errors when I run task scheduler.Error 1Error 2Error 3I tried suggestions found on Google, but to no avail.
Can you help?
LVL 1
sgleeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy LidbetterCommented:
Hi sglee, have you tried this?

Open Task Scheduler and click OK when prompted with the error. It may seem like you are receiving the same error over and over, but this is really due to the number of tasks which are broken. Make a note of the number of times you are prompted with the the selected task "{0}" error. This is the number of task files that are out of sync with the registry.

Start with the first folder under Windows tasks (Task Scheduler(Local)\Task Scheduler Library\Microsoft\Windows) and select each folder in turn until you receive the the selected task "{0}" error. This folder contains files that are not in sync with the task scheduler.

Open Windows Explorer and navigate to the tasks file folder (%SystemFolder%\Tasks\Microsoft\Windows) and find the folder which corresponds to the folder in which you received the error.

For some tasks you will be able to determine which files need to be deleted by comparing the list in the Task Scheduler with the list of files in Explorer. Some tasks will only have a single file in explorer, or, in one case I had 2 and the first was missing. Once Task Scheduler encounters this error it will no longer display tasks so it makes the job of getting the two in sync a little more difficult. Once you have determined which files exist in the File Folder but do not exist in the Task Scheduler folder, delete those files.

IMPORTANT - Close and Re-open Task Scheduler. Once the error is encountered, Task Scheduler no longer displays the tasks so you need to close it and restart in order to continue your synchronization effort.

Continue to select folders in Task Scheduler under Windows tasks until you encounter the error again and repeat the process of determining which file exists on the file system, but not in Task Scheduler.
sgleeAuthor Commented:
@Guy
I saw the same article on Google. But it was too complicated to follow ... in the middle I gave up. Before spending time on it, let me ask you this. Have you run into the same problem personally and solved the issue with the suggestion you made above?
Guy LidbetterCommented:
Yes, I did

Copied and pasted from my One Note collection....
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jcimarronCommented:
sglee--

Is this something new?  If so run a System Restore to a time before the problem started.  If no help:

Run sfc /scannow from an admin command prompt.

If no success, you may consider a Repair Install
http://www.sevenforums.com/tutorials/3413-repair-install.html

This should not affect installed programs or personal data, but a back up first always is a good idea.

This article might also be of interest
http://www.gegeek.com/documents/0DB891F2F4C2BAAF9CE72FADF316838D45452FF1.html
sgleeAuthor Commented:
Sorry for not updating the progress sooner.

Thanks for the suggestions, but the solutions are too complicated for me to follow.
I will try "sfc /scannow" later this evening, but I am not sure if it will take care of the problem.
Since I don't know when task scheduler got corrupted, it is hard for me to pick a date for system restore.
Repair install is too risky.
But my dilemma is that unless I get Task Scheduler fixed, I won't be able to schedule anything on Windows ... whether it is Windows scheduled backup or Quickbooks scheduled backup or a batch file (that has Robocopy commands).
McKnifeCommented:
This is very easy to fix if we only knew the name of the corrupted task. See if there's indeed a task by the name of (0) present in the registry below HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks [search for 0 or (0)] or at the file system at C:\Windows\System32\Tasks
sgleeAuthor Commented:
System32/TasksRegistry - TasksHere is what I see in the registry and windows explorer. "Daily File Backup" is a task that I created.
When I searched {0} in registry (by right click on "Tasks" and choose Find), it did not find anything.
McKnifeCommented:
I didn't advise to search for {0} but for 0 or (0). Please retry.
sgleeAuthor Commented:
Sorry ... I searched for (0), nothing was found. I searched for 0 and then every single line had 0s.
McKnifeCommented:
Sure :) inside the registry, there are a lot of 0s. But inside the folder?
sgleeAuthor Commented:
Oh... I will look for it in windows exploere later today and post the result.
jcimarronCommented:
sglee--
"Repair install is too risky. "
What makes you feel Repair Install is risky?  Remember I suggested a backup first.
Guy LidbetterCommented:
Hi sglee...

First off - did you try disable then re-enable the Disk Defrag task under Microsoft > Windows > Defrag?  (This is a known fix)... otherwise

Fixing this is a manual task... work through it slowly or go straight to the workaround at the bottom (Not recommended)

Lets lay out the structure for task scheduler.

By Default in Windows 7 under "c:\windows\system32\tasks" is a list of xml files and folders which will relate to your exact task scheduler list, Naming and folder structure. i.e. If you create a folder in there it will appear in task scheduler as well.

When you create a task two registry keys are written...
1. Under the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree there are 3 values: Default, ID and Index
Default: is a value automatically populated when creating a new key and can be ignored
ID: The tasks identification in the registry or (GUID) - relates to the ID in Tasks key
Index: Whether the task is visible or not in the scheduler, usually "0" (Hidden) or "3" (Visible).

2. Under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks a new key is created with the tasks ID. It has 5 values, Default, Dynamic info, Has, path and Triggers.
Default: same as above
DynamicInfo: I believe holds values like last run time, last run result and next run time.
Hash: this is a hash value created from the XML file. if you modify the xml directly, this hash will mismatch and the task will no longer function. You'll get a message regarding tampering if you access it in task scheduler.
Path: The path of the XML file within "c:\windows\system32\tasks"
Triggers: the configured triggers in the task that actually fires off the task.

The task scheduler application, is basically a folder browser with the ability to create the XML file that holds tasks settings, it does not manage running them. All 3 of these need to be in place for scheduler to display the task.

If the XML file is not present, no problem, it just doesn't appear. If the task doesn't appear in the Tree Registry Key, no problem, it also just doesn't appear.
However; if the ID is not present in the TASKS registry key, or these values are out of sync we start seeing task doesn't exist errors.

So we now know "where" the problem is.

So lets find it... open up the registry and expand the tasks key and the Tree key.
Go through the Tree keys one by one with the following steps (Don't worry about folders like Microsoft, just the keys with values).
1. Note the Task name, right click the Tasks root folder and click find - enter the Task Name.
2. Ensure there is an ID and theta the values match.
3. If ANYTHING doesn't match up... delete the Tree key, the task key and the associated XML file.

This should resolve this for you....  ALTERNATIVELY...

1. Open Registry Editor
2. Open the following Key
a. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Tracing\SCM\Regular]
3. Add⁄Change the following value
a. Name = TracingDisabled
b. Type = REG_DWORD
c. Value Data = 0
4. Reboot the Server
5. Open Task Scheduler and verify that you can see the tasks

GOOD LUCK
sgleeAuthor Commented:
@Guy
Thanks for the detailed information and I appreciate it. Let me try them this evening and keep you posted.
sgleeAuthor Commented:
@Guy Lidbetter

Sorry for the late reply, but I tried both of your suggestions:
(1) First off - did you try disable then re-enable the Disk Defrag task under Microsoft > Windows > Defrag?  
(2)
1. Open Registry Editor
2. Open the following Key
a. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Tracing\SCM\Regular]
3. Add⁄Change the following value
a. Name = TracingDisabled
b. Type = REG_DWORD
c. Value Data = 0

Both attempts resulted in the same error.
I would like to close this case as there is no solution.
jcimarronCommented:
sglee--
I am pretty sure a Repair Install would fix the Task Scheduler problem.  http:#a40867607
It should take no more than about two hours.
sgleeAuthor Commented:
@jcimarron
Thanks for the suggestion, but I can't afford to try "Repair Install" because all is working fine for scheduler.
I rather not go there if I could.

Thanks for all the suggestions!
jcimarronCommented:
sglee--
I am confused.  The title of this thread is "Task Scheduler error" and in one of your posts you mention Task Scheduler is "corrupt".

Now Task Scheduler is "working fine"?
sgleeAuthor Commented:
@jcimarron
Sorry for the confusion for my wording. Task Scheduler is NOT working. The situation is exactly the SAME as before my original posting.
jcimarronCommented:
sglee--
So why can you not "afford" to run Repair Install?  There is virtually no risk if you backup first.
sgleeAuthor Commented:
@jcimarron
I am not going there since the computer is working just fine.
There is not much to gain even if "Repair Install" works.
I was going to schedule my batch (.bat) file (that copies some files from C drive to external USB HD using ROBOCOPY) and ran into this error.
Since some of the methods (provided by experts) did not work, I created a shortcut on the user's desktop and the user runs that each day. So I don't want to go thru  the hassle and possibly expanding the problem.
Guy LidbetterCommented:
Hi sglee,

You will probably find that the scheduled tasks will still run. This issue appears to be cosmetic, or affecting only a single task.

In this case there is no need to have the user manually running the batch, you can use powershell to create the task... I've botched something up for you to try...

$Task = New-ScheduledTaskAction -Execute 'c:\folder\file.bat' `

$Trigger =  New-ScheduledTaskTrigger -Daily -At 9am

Register-ScheduledTask -Action $Task -Trigger $trigger -TaskName "Robocopy" -Description "Daily copy of files from C:"

Open in new window

sgleeAuthor Commented:
@Guy Lidbetter
I did not have time to try the script you provided in ID: 40903858. I will do that soon and post the result.
jcimarronCommented:
sglee--
Concerning Repair Install
"I am not going there since the computer is working just fine."
Yes, but Task Scheduler is part of the computer and OS.  And what Repair Install does is renew your Registry.

http://www.techsupportforum.com/forums/f10/solved-what-does-a-repair-install-do-308022.html
http://windowssecrets.com/top-story/win7s-no-reformat-nondestructive-reinstall/
sgleeAuthor Commented:
@jcimarron
I do not have a original CD that came with the computer.
jcimarronCommented:
sglee--
If you know your product key, you should be able to download an .iso file for Win 7 from here
https://www.microsoft.com/en-us/software-download/windows7
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.