Error 0x10 Scheduled Task
Contents |
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) Home20132010Other VersionsLibraryForumsGallery Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Robocopy fails as scheduled task in Windows 7 with error code 0x10 Windows 7 IT Pro > robocopy scheduled task 0x10 Windows 7 Miscellaneous Question 0 Sign in to vote Hi, I'm trying to
Scheduled Task Result 0x10
migrate a robocopy based backup from XP (where it does work) to Windows 7. The backup job simply copies a task scheduler return code 16 directory on the local PC to a network drive on the file server using a batch file which contains the following: robocopy "C:\projects" "N:\backup" /e /s /r:1 /w:1 /log+:backuplog.txt The user account it
Task Scheduler 0x3
is running under has full access to the network drive (N:). When I run the batch file directly from the command line it works perfectly. It also used to work without issue on a Windows XP machine. UAC is disabled. Whenever the task runs it fails with the error code 0x10. Thanks Tuesday, September 27, 2011 1:17 PM Reply | Quote Answers 2 Sign in to vote windows task scheduler last run result 0x10 0x10=ERROR_BAD_ENVIRONMENT 10 (0xA) The environment is incorrect. I would reciommend using UNC paths (\\server\share\folder\) instead of mapped drives and specifying full paths in quoteswhenever possible (not backuplog.txt, but "c:\logs\backuplog.txt"MCP/MCSA/MCTS/MCITP Marked as answer by Miya YaoModerator Wednesday, October 05, 2011 6:38 AM Tuesday, September 27, 2011 1:53 PM Reply | Quote 1 Sign in to vote Here's a similar thread that had problems running a batch file using Task Scheduler. A respondent Brian Vandemark proposed the following solution which helped many people fix the issue. This post got many helpful votes, so I guess this is the solution and should work: http://social.technet.microsoft.com/Forums/en/winservermanager/thread/d47d116e-10b9-44f0-9a30-7406c86c2fbe Quoting from there for your convenience, it says: "I wanted to summarize all of the steps I performed to solve my problem. I would guess that maybe some of these are not needed, but I'll list them all to hopefully help you get it working 1) Make sure that the task is set to "configure for Windows Vista or Windows 2008" on the first page of the task properties (under the "general" tab) 2) Make sure that the task is set to "start in" the folder that contains the batch file: open the
Case and Cooling Fetish CPU & Motherboard Technologia Mobile Computing Outpost Networking Matrix Other Hardware Agora Classifieds Ars DIY Forum (Name TBD!) Operating Systems & Software Battlefront Microsoft
Robocopy Task Scheduler
OS & Software Colloquium Linux Kung Fu Windows Technical Mojo Distributed Computing
0x10 In Decimal
Arcana Macintoshian Achaia Programmer's Symposium The Server Room Ars Lykaion Gaming, Extra Strength Caplets The Lounge scheduled task 0x2 The Soap Box The Boardroom The Observatory Ars Help & Feedback Ars Subscription Member Areas Image Galleries Scheduled robocopy failing with 0x10 11 posts Quitch "Lord of the Fleas" Ars Praefectus Tribus: https://social.technet.microsoft.com/Forums/office/en-US/fdb09326-46c3-4536-842d-ac15bf886076/robocopy-fails-as-scheduled-task-in-windows-7-with-error-code-0x10?forum=w7itprogeneral UK Registered: Apr 22, 2003Posts: 3154 Posted: Fri Dec 21, 2007 9:06 am I have scheduled the following task:"D:\Program Files\Windows Resource Kits\Tools\robocopy.exe" "\\nas-brist\Sage Line 50 Accounts\Bristol" "D:\Sage Line 50 Accounts\Bristol" /MIR /MOT:30 /RH:1930-0700 /TBD > "D:\Sage Line 50 Accounts\Bristol.txt"With Start In set to:"D:\Program Files\Windows Resource Kits\Tools"However, this task (tested under my credentials) is failing with error code 0x10 which means it failed immediately, nothing was copied. If I run that very same command direct http://arstechnica.com/civis/viewtopic.php?t=150932 from the command prompt under my credentials it works fine.Why? jem313 Seniorius Lurkius Registered: Jun 7, 2006Posts: 47 Posted: Fri Dec 21, 2007 9:31 am Did you try putting the location for robocopy in the system path? Quitch "Lord of the Fleas" Ars Praefectus Tribus: UK Registered: Apr 22, 2003Posts: 3154 Posted: Fri Dec 21, 2007 9:46 am The Windows Resource Kit inserts itself into the system path.As a bit of a clunky workaround I can put the commands in batch files, schedule them, then terminate the task, thus leaving me a working robocopy and no cmd.exe process. But that is a bit ugly. Fulgan Ars Tribunus Angusticlavius et Subscriptor Tribus: Swiss iguanas Registered: Jun 28, 2000Posts: 7508 Posted: Fri Dec 21, 2007 10:16 am c:\>net helpmsg 16 The directory cannot be removed.i would bet you're either not running the command from the correct location or you have a right issue on the target Quitch "Lord of the Fleas" Ars Praefectus Tribus: UK Registered: Apr 22, 2003Posts: 3154 Posted: Fri Dec 21, 2007 10:30 am quote:Originally posted by Fulgan:c:\>net helpmsg 16 The directory cannot be removed.i would bet you're either not running the command from the correct location or you have a right issue on the target It shouldn't be rights because I can copy & paste t
a NAS device. The bat file is: batbackup.bat robocopy d:\docume~1\ x:\batbackup\documents /e robocopy d:\pictures\ x:\batbackup\pictures /e robocopy d:\ezfile~1\ x:\batbackup\ezfile~1 http://www.networksteve.com/forum/topic.php/Bat_File_runs_fine_manually,_but_not_as_a_scheduled_task/?TopicId=29214&Posts=4 /e I have this scheduled as a task, and to run as http://www.winvistatips.com/threads/error-running-scheduled-task-windows-server-2008.574464/ admin. I get no errors in scheuler, and it actually says it ran on time. But nothing has been copied over since the last time I manually ran this. If I run the bat file from the command line, it runs absolutly fine. When I look in scheduled task the history, within 1 second the following ids are created: event id task category Operational code 100 task started 1 200 action started 1 129 created tastk process info 201 action completed 2 102 task completed 2 In the main window, the "last run result" is (0x10) Thoughts? March 29th, 2012 2:08pm is x a mapped network drive? I am error 0x10 scheduled gonna guess that it is and your problem is that it is running in your user context, but not with your profile loaded so X doesnt exist try using the full network path Free Windows Admin Tool Kit Click here and download it now March 29th, 2012 2:38pm Hi, As you run the task as admin, whether that specific account has permission to run the BAT file, access/copy files from d:\
on a Windows Server Standard 2008 machine. The machine is currently running in evaluation mode. I installed it on 9/11/2008. On our existing fileserver we have a data replication script that copies data from remote office fileshares to the local system for backup every night. I have copied the script to the new fileserver, making one change to the path (the target for copied files is on the C: drive instead of the D: drive now). Here is the script: robocopy \\aa-dc1.company.local\share c:\datamirrors\AA /R:3 /MIR > AA.Log robocopy \\gr-dc1.company.local\share c:\datamirrors\GR /R:3 /MIR > GR.Log robocopy \\tc-1.company.local\share c:\datamirrors\TC /R:3 /MIR > TC.Log robocopy \\10.251.20.1\c$\db-backup c:\datamirrors\Kaseya\db-backup /R:3 /MIR > Kaseya.Log robocopy \\10.251.20.1\c$\kaseya c:\datamirrors\Kaseya\Kaseya /R:3 /MIR >> Kaseya.Log - Both the old and new fileservers are members of the domain, as are the remote fileservers - The script on both servers is configured to use the domain admin account credentials - If I manually run the script from the new fileserver, it starts running fine - If I create a scheduled task to run the script, it fails with error 0x10 Any help is appreciated. I'd really like this script to run on a schedule. Thanks! Joe Grover, Oct 10, 2008 #1 Advertisements Joe Grover Guest As an update, the script runs fine if I don't have it go to a log file. I tried using the /LOG command (changing > AA.log to /LOG:"c:\datamirrors\aa.log") and it worked as well. I've updated the script with this information (using /LOG+ for the kaseya log that we append to) and it seems to be working fine. "Joe Grover" <> wrote in message news:um$... >I am setting up a new fileserver on a Windows Server Standard 2008 machine. >The machine is currently running in evaluation mode. I installed it on >9/11/2008. > > On our existing fileserver we have a data replication script that copies > data from remote office fileshares to the local system for backup every > night. I have copied the script to the new fileserver, making one change > to the path (the target for copied files is on the C: drive instead of the > D: drive now). Here is the script: > > robocopy \\aa-dc1.company.local\share c:\datamirrors\AA /R:3 /MIR > AA.Log > robocopy \\gr-dc1.company.local\share c:\datamirrors\GR /R:3 /MIR > GR.Log > robocopy \\tc-1.company.local\share c:\datamirrors\TC /R:3 /MIR > TC.Log > > robocopy \\10.251.20.1\c$\db-backup c:\datamirrors\Kaseya\db-backup /R:3 > /MIR > Kaseya.Log > robocopy \\10.251.20.1\c$\kaseya c:\datamirrors\Kaseya\Kaseya /R:3 /MIR >> > Kaseya.Log > > - Both the old and new