Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scheduled task : Error 0X3 but Log doesn't give any error

I have several tasks using Robocopy.exe, On One of those tasks, I get a error result 0X3 but the log file doesn't display any error. Here is the command :

ROBOCOPY \\X\L$\FORMATION \\Y\O$\FORMATION /MIR /sec /W:2 /R:5 /log:c:\O_journal.log

I tried to launch it without the task scheduler, it worked fine without ant errors.

I know that the error 0X3 is : ERROR_PATH_NOT_FOUND.But the log file doesn't display any error.

If someone have any clue or any methods...

like image 781
Spoot Avatar asked Oct 29 '14 14:10

Spoot


2 Answers

This is a standard behavior and relates to exit codes from 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.

And a combination of them, ie: 0x03 = 0x02 + 0x01

See https://blogs.technet.microsoft.com/deploymentguys/2008/06/16/robocopy-exit-codes/ for a complete explanation.

like image 107
Donald Mac Kenzie Avatar answered Sep 19 '22 12:09

Donald Mac Kenzie


This is an issue to the path configured on the robocopy script. I have fixed this issue by adding the root directory or the main drive to both source and destination.

Note: Please make sure that you are an administrator to both Servers (source and destination)

Example:

Source: "\\192.168.1.2\e$\my files"

Destination: "\\192.168.1.5\d$\backup"

The root directory or the main drive that I have referred is the "e$" and "d$" as shown above. If this will not included in your script, you will be encountering the "0X3" error in the Scheduler and the scheduler will not works.

Note: This script is to synchronize/replicate the file from the source to destination.

Parameters used. /MIR /E /Z /R:5 /W:5

This is how the script looks as a whole:

robocopy "\\\192.168.1.2\e$\my files" "\\\192.168.1.5\d$\backup" /MIR /E /Z /R:5 /W:5

Hope this might help.

Thanks.

Xian

like image 38
Christian Gomez Avatar answered Sep 20 '22 12:09

Christian Gomez