Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

Scheduler result 0x10 or return code 16

Active Directory, Domain, DNS, WINS, DHCP, SBS, New Releases.

Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:28 pm

We created a batch file to run robocopy. If I open cmd and select run as administrator, the batch runs fine. Or if I setup "Run only when user is logged on" in Scheduler, it runs fine too. However, I setup "Run whether user is logeed on or not", it doesn't work with the following log.

Log Name: Microsoft-Windows-TaskScheduler/Operational
Source: Microsoft-Windows-TaskScheduler
Date: 2/7/2011 8:48:33 PM
Event ID: 201
Task Category: Action completed
Level: Information
Keywords:
User: administrator
Computer: data

Description:
Task Scheduler successfully completed task "\SyncData" , instance "{854fcef7-7472-4c7f-9032-edbbba46bd50}" , action "C:\Windows\SYSTEM32\cmd.exe" with return code 16.

How can I setup scheduler to "Run whether user is logeed on or not"?
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:28 pm

Before moving on, I would like to know the following information:

1. Does the batch file intend to copy files to network shares?

2. Did you select the “Do not store password” option?


If the batch file is copying files to network share, then please add the Computer account (The computer that is running the task) to the network share and give it write permission. "Run whether user is logged on or not" option runs in System account which only have access to local resources. So we need give the account permission to access network resources.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:29 pm

The batch file intends to copy file from other server shared drive to local drive. I tried to check “Do not store password” option and add computer account (teh computer is running task) to newtork shared drive with full permissions. However, that doesn't fix the problem.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:29 pm

To access network resource, the “Do not store password” option should not be selected. You can see the explanation from this article:



Task Security Context

http://technet.microsoft.com/en-us/libr ... 22152.aspx



If you select the checkbox labeled Do not store password, Task Scheduler will not store the credentials supplied on the local computer, but will discard them after properly authenticating the user. When required to run the task, the Task Scheduler service will use the “Service-for-User” (S4U) extensions to the Kerberos authentication protocol to retrieve the user’s token.



When using S4U the ability of the service to use the security context of the account is constrained. In particular, the service can only use the security context to access local resources.



So please uncheck the “Do not store password” option and see if the issue still exists.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:29 pm

In my first try, I didn't check the Do not store password. Since you mention it in your post, then I tried it. Any way, doesn't matter I check Do not store password or not, it gets the same error.

I think adding the computer account to the network shared drive makes sense because it seems to me this is permission issue. however, adding the computer account doesn't fix the problem.

Any other suggestions?
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:30 pm

robocopy \\cbgdata3\shared E:\shared /E /SEC /V /NP /PURGE /LOG:synclogs.txt /R:1 /W:3
--------------------------------------------------------------------------------
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:30 pm

I tested the robocopy bat file in task scheduler and it succeeded if I choose “Run whether user is logeed on or not”.



I noticed that when you save the task schedule, it will prompt you for the user credential to run this task. I just entered the user that I logged on and it works.



So do you see the prompt when you save the task schedule?

If when the user is logged off and the task failed, what error is the robocopy log recorded?
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:33 pm

Yes, whenever you make change, it prompts for credentials. I use domain admin account. It doesn't have robocopy log because the task doesn't run. I just created another job and on different windows 2008 server. I get the same problem.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:33 pm

Is the E: drive a local drive or a mapped drive?

Although robocopy.exe is located in system32 folder by default on 2008, but the code 16 means “the device does not recognize the command”, so what if you use the full local path of robocopy.exe command in the .bat file?
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sat Apr 30, 2011 2:34 pm

The E: drive a local drive. Yes, it works after I copy the robocopy.exe to C:\. Thank you.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby blin » Sun Nov 06, 2011 11:19 am

Here are robocopy's return codes are a bitmap.
They are described in detail in the file "robocopy.doc" in the installation folder, Page 33:
Hex Bit Value Decimal Value Meaning If Set
0x10 16 Serious error. Robocopy did not copy any files. This is either a usage error or an error due to insufficient access privileges on the source or destination directories.
0x08 8 Some files or directories could not be copied (copy errors occurred and the retry limit was exceeded). Check these errors further.
0x04 4 Some Mismatched files or directories were detected. Examine the output log. Housekeeping is probably necessary.
0x02 2 Some Extra files or directories were detected. Examine the output log. Some housekeeping may be needed.
0x01 1 One or more files were copied successfully (that is, new files have arrived).
0x00 0 No errors occurred, and no copying was done. The source and destination directory trees are completely synchronized.

Basically, 0x10 16 is permission issue. Here are some other cases.

1. The client created batch file and schedule to copy files between two local dirves automatically, but keep receiving this error. Assigning the admin account with full permissions on both drives fixes the problem.

2. The client created batch file and schedule to copy files from a local dirve to a network drive automatically, but keep receiving this error. Net map the network drive with /user:useraccountpassword. That fix the problem.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Re: Scheduler result 0x10 or return code 16

Postby guest » Tue Nov 18, 2014 2:47 pm

Instead of using a mapped drive letter, use the UNC path of the share (\\servername\sharename\folder).
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Re: Scheduler result 0x10 or return code 16

Postby guest » Tue Nov 18, 2014 2:47 pm

Solved by adding the following action before calling the robocopy command:
net use j: \\RemoteHost\Files RemotePassword /user:RemoteUser
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Re: Scheduler result 0x10 or return code 16

Postby guest » Tue Nov 18, 2014 2:48 pm

When my Start in (optional): path was a UNC path, it wouldn't work. So I moved my batch on the server and everything worked correctly.
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Re: Scheduler result 0x10 or return code 16

Postby blin » Mon Jan 25, 2016 6:46 pm

In our case, when we run command line b yline, we see this error:
ERROR 67 (0x00000043) Getting File System Type of Source \\filesvr01\BEData\
The network name cannot be found.

We find the problem is BEData is not shared. After sharing the folder, it works.
How to Configure and Troubleshoot Cisco
http://www.howtocisco.com

Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com
blin
Site Admin
 
Posts: 3642
Joined: Wed Dec 31, 1969 7:00 pm
Location: Chicago, USA

Next

Return to Windows

Your Ad Here

Who is online

Users browsing this forum: No registered users and 3 guests