Recently met a strange phenomenon, in doing a regular backup of a system to use the non-system with the rsync command, but the manual start is no problem, but also very much expect the bulk of the host on many, how to do? Under Windows Server 2003, there is no problem performing a scheduled task, and there is an unexpected exception under Windows Server 2008 R2.
Normally, our mission plan has feedback values that let you determine if the task was scheduled to last.
· Code 0 or 0x0: Operation completed successfully.
· Code 1 or 0x1: The function called is incorrect or an unknown function was invoked. This error can occur if the file does not exist
· Code 10 or 0xa: the environment is incorrect.
· Code 0x8009000f: General access Denied
Figure 1 See the last run result is not 0
This kind of non-state situation means that it cannot be accepted.
I see this error message by setting a breakpoint on this batch.
Figure 2 Add pause to the batch process breakpoint, view error message
Obviously, this rsync is not a system-self-contained program and file, so it cannot be invoked directly by the system, guessing about the environment variables, and looking carefully at the task scheduling options under Windows Server 2008 R2, where I see the fill in the blanks.
Figure 3 starts with (optional)
I fill this out as the directory where the script is located, run the task plan again, get a return token of success, and receive the appropriate backup content on the server side of the service.
In retrospect, the two-version operating system has a different task schedule, and there are not many items that can be selected under Windows Server 2003, but he will start out by default, using the previous level of the script.
Figure 4 starts at the bottom of Windows Server 2003 and is filled in by default
As a result, it is recommended that you start by setting up the task plan for Windows Server 2008, 2012, based on the NT6 core system.