计划任务:错误0X3但日志不会给出任何错误
问题描述:
我有几个任务使用Robocopy.exe
,其中一个任务,我得到一个错误结果0X3
但日志文件不显示任何错误。 下面是一个命令:计划任务:错误0X3但日志不会给出任何错误
ROBOCOPY \\X\L$\FORMATION \\Y\O$\FORMATION /MIR /sec /W:2 /R:5 /log:c:\O_journal.log
我试图启动它没有任务调度,它没有蚂蚁的错误的罚款。
我知道错误0X3
是:ERROR_PATH_NOT_FOUND
。但是日志文件不显示任何错误。
如果有人有任何线索或任何方法...
答
这是一个问题,对ROBOCOPY脚本配置的路径。我已经通过将根目录或主驱动器添加到源和目标来解决了此问题。
注:请确保您是管理员,这两个服务器(源和目的地)
例子:
来源:“\\ 192.168.1.2 \ E $ \我的文件“
目的地: ”\\ 192.168.1.5 \ d $ \备份“
根目录或主驱动器我已经提到的是如上所示的“e $”和“d $”。如果这不包含在您的脚本中,您将在计划程序中遇到“0X3”错误,并且计划程序将不起作用。
注意:此脚本用于将文件从源同步/复制到目标。
使用的参数。 /MIR /E /Z /R:5 /W:5
这是脚本的外观作为一个整体:
robocopy "\\\192.168.1.2\e$\my files" "\\\192.168.1.5\d$\backup" /MIR /E /Z /R:5 /W:5
希望这可以帮助。
谢谢。
冼
答
这是一个标准的行为并且涉及从的Robocopy退出代码:
0×00 0 No errors occurred, and no copying was done.
The source and destination directory trees are completely synchronized.
0×01 1 One or more files were copied successfully (that is, new files have arrived).
0×02 2 Some Extra files or directories were detected. No files were copied
Examine the output log for details.
0×04 4 Some Mismatched files or directories were detected.
Examine the output log. Housekeeping might be required.
0×08 8 Some files or directories could not be copied
(copy errors occurred and the retry limit was exceeded).
Check these errors further.
0×10 16 Serious error. Robocopy did not copy any files.
Either a usage error or an error due to insufficient access privileges
on the source or destination directories.
和它们的组合,即:×03 = 0×02 + 0×01
参见https://blogs.technet.microsoft.com/deploymentguys/2008/06/16/robocopy-exit-codes/为完整的解释。
我遇到了在Windows Server 2012R2域控制器上运行的脚本的相同问题。它可能与用于启动计划进程的用户帐户不在本地管理员组中。本地管理员组在域控制器上的工作方式稍有不同。我不是服务器管理员,所以我无法解释为什么这很重要。我假设我的用户帐户不在导致我的问题的本地管理员组中,因为Robocopy似乎已成功完成。 – 2015-11-24 17:10:04