How to deal with it, there is a "Task Scheduler Service unavailable when starting the task scheduler. The task scheduler will try to establish a new connection with it .", Task unavailable

Source: Internet
Author: User

How to deal with it, there is a "Task Scheduler Service unavailable when starting the task scheduler. The task scheduler will try to establish a new connection with it .", Task unavailable
Symptom:

There is a Windows Server 2008 R2 Server that opens the task plan and the following error message appears.

The error message is shown in the title "The Task Scheduler Service is unavailable. The task scheduler will try to establish a new connection with it .", The corresponding English is "task scheduler service is not available. task scheduler will attempt to reconnect to it ".

The error message does not have the red background and white X in the traditional sense. It is only an alarm information and mentions the Task Scheduler Service, this reminds me of whether the task plan service is abnormal at this time.

By checking the Task plan service (display name: Task schedle, service name: Schedule) in the Service (services. msc), it is found that the service cannot be stopped.

Figure 1 shows the "started" service status, but it is uncontrollable

Then, through the task manager, find the specific svchost process under the service tag, and find that there are many non-system critical services under this svchost, so I ended this svchost process, then go to the service (services. msc) to view the properties of the task plan, which is controllable. After the task is started, the task plan is opened again, and the problem persists.

The problem is solved as follows:

Although the problem persists, after I click OK, the original task plan can still be viewed in the task plan library, and their working status is normal through viewing the history.

Figure 2 error message about service unavailability of the Task Scheduler

Therefore, it can be basically determined that the problem is not the Task Scheduler Service itself. Microsoft's KB2305420 is obtained through a keyword search in both Chinese and English. Although it is a method to introduce the sequelae of security updates, however, I learned how the task scheduler works.

We usually see the task scheduler Management Program (taskschd. msc). In fact, it integrates the Registry (HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Schedule) information and the actual task file library (% SYSTEMDRIVE % \ Windows \ System32 \ Tasks).

Therefore, the idea of solving the problem starts from these two points. First, check these task files under the task file library (% SYSTEMDRIVE % \ Windows \ System32 \ Tasks, microsoft defines the damaged file here as a 0-byte task file and a task file with an error mark. Therefore, it looks for a task file with a 0-byte value first.

Figure 3 shows a 0-byte file in the "\ Microsoft \ Windows \ SoftwareProtectionPlatform" path. I tried to copy the file and open it. I was told that I had no permission.

The above is an idea I want to copy and open, but this file is told to have no permission to open. Fortunately, I have a large number of server resources and copied a file in this path. This file without a suffix is actually an xml file structure, so it can be opened in a text editor such as Notepad.

Now, I continue to open the task scheduler Management Program (taskschd. msc), navigate to \ Microsoft \ Windows \ SoftwareProtectionPlatform by path, and we can see that the problem is repeated.

Figure 4 refresh multiple times to determine the origin of the suspected Problem

After clicking "OK", I still can't see any tasks. This is really a mess with the 0-byte file, so I returned to the position shown in Figure 3 and deleted the bad file, use the copied file to import the task on the Figure 4 interface. After multiple refreshes, the problem is solved.

To further judge whether there are any other problem points, I closed the task scheduler multiple times, traversed all the task folders, and found that the problem had been solved.

Conclusion:

Summary of the problem:

Because the task plan is a service that depends on the svchost process to start, the above "error" information will not actually interfere with the existing task plan.

The scheduler itself is only a management interface. You can use it to check whether the scheduler executes the corresponding script when the trigger starts (History tab card)

To determine whether a task plan can be executed, you need to ensure that the service (services. msc) in the Task Scheduler Service (display name: Task schedle, service name: Schedule) normal operation, configured environment variables are normal, you can stamp here to see more

Check the Registry (HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows NT \ CurrentVersion \ Schedule) information and the 0-byte files related to the actual task file library (% SYSTEMDRIVE % \ Windows \ System32 \ Tasks) carefully.

 

Connection to available information:

Https://kickthatcomputer.wordpress.com/2014/06/19/task-scheduler-service-is-not-available/

Http://www.cnblogs.com/mannyzhoug/archive/2013/05/28/3104030.html

Https://support.microsoft.com/zh-cn/kb/2305420

 

-= EOB =-

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.