Workaround for Windows Server 2008 Task Scheduler not to run automatically

Source: Internet
Author: User

Issue: The bat script was written, executed directly, succeeded, but the task was not run successfully in Task Manager and the result is: 0x1, the system environment is Windows Server 2008.

Analysis: The bat task did not invoke execution.

Solution:

Trying to change users to create a task is not possible, and finally an article on the Web provides clues.

In the Actions window of the task initiation, in addition to the original launcher path, add the attribute "start at" (fill in the top directory of the bat file)

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

Windows Server R2 may encounter a workaround that the Task Scheduler cannot run automatically

Recently encountered a strange phenomenon, in the regular backup of a system to use the non-system comes with the rsync command, but the manual boot is not a problem, but also very much expect to batch on multiple hosts, how to do? Windows Server 2003 does not have a problem performing a scheduled task, but there is an unexpected occurrence under Windows Server R2.

Under normal circumstances our mission plan will have a feedback value, which can be used to determine whether the task is scheduled to run normally (verbose connection: http://support.microsoft.com/kb/267031/).

    • Code 0 or 0x0: Operation completed successfully.
    • Code 1 or 0x1: An incorrect function was called or an unknown function was called.
    • Code 10 or 0xa: The environment is not correct.
    • Code 0x8009000f: General access Denied

Figure 1 See a non-0 occurrence of the last run result

This non-0 situation indicates that it cannot be accepted.

By setting breakpoints on this batch, I see this error message.

Figure 2 Adding pause to the batch for breakpoints, viewing error messages

Obviously, this rsync is not the system comes with the program and files, so can not be called directly by the system, guessing and environment variables, carefully looking for Windows Server R2 under the task scheduling options, I saw this fill the blanks.

Figure 3 starting with (optional) item

I fill this out as the directory where the script is located, run the task plan again, get the token to return success, and receive the corresponding backup content on the server side of the service.

Recall here that two versions of the operating system's task schedule are different, there are not many items to choose from under Windows Server 2003, but he will start by default to fill in and use the top-level directory of the script.

Figure 4 Windows Server 2003 below start at, default is filled

Therefore, it is recommended that you set the task schedule for Windows Server 2008, 2012, which is based on the NT6 core system, to start at a later time.

-=eob=-

Workaround for Windows Server 2008 Task Scheduler not to run automatically

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.