[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Microsoft, Task Scheduler, Result: The task completed with an exit code of (b)

Posted on 2008-10-07
12
Medium Priority
?
2,324 Views
Last Modified: 2011-10-19
A task has been scheduled in Task Scheduler to run a batch file that calls a Robocopy script.  The script copies files from one directory on the server to another directory on the same server, nightly.  The Task Scheduler is executed by the domain admin account.
GIS.txt
0
Comment
Question by:ExpertAssist
  • 7
  • 5
12 Comments
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22664403
0
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22664415
1) has this worked in the past ?
2) Wat has changed ?
3) Does a manual run have issues ?
Mostly errors are caused by permissions of the task scheduled, and the context of the user.
4.Does this script create a log?  If not, could you change it so it does create a log - writing to the log every so often.  Then you could look at the log and see the last portion that ran successfully.
5.Notmally these error msgs will be generated because the script may try to insert nulls into fields that were not setup to allow null values

also ref  these stuffs,

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2003_Server/Q_22034171.html
0
 

Author Comment

by:ExpertAssist
ID: 22664635
The following are the entries in the log file.
GISCOPY.job" (GISCOPY.bat)
      Started 8/3/2008 6:00:01 PM
"GISCOPY.job" (GISCOPY.bat)
      Finished 8/3/2008 6:05:24 PM
      Result: The task completed with an exit code of (b).

I added a dumby file for testing and ran the script manually.  The file copied.  Then I renamed the dumby file and tried running the script again.  Again the dumby file copied.  It does appear that the script is running using the Task Scheduler.  What I noticed in the Robocopy log is that some of the files cannot be copied because they are in use.  Could this be the reason for the (b) exit code?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ExpertAssist
ID: 22664663
Do you know what the /c switch stands for?
0
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22664767
/copy:<CopyFlags>
 Specifies the file properties to be copied. The following are the valid values for this option:

D Data
A Attributes
T Time stamps
S NTFS access control list (ACL)
O Owner information
U Auditing information
The default value for CopyFlags is DAT (data, attributes, and time stamps).
 
0
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22664768
0
 

Author Comment

by:ExpertAssist
ID: 22669665
I checked the Robocopy commands and I have the /Copy:Dat configured.  After more testing, it appears that the error is a result of open files not copying to the new directory.  I may need to find another solution besides Robocopy.  
0
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22669739
you have to go for a open file agent backup solution...
0
 

Author Comment

by:ExpertAssist
ID: 22669791
Do you have any suggestions?  We are using Netbackup for backing up files, but I don't have a solution that I can use with a batch file to backup and restore files over the night.
0
 
LVL 18

Accepted Solution

by:
sk_raja_raja earned 500 total points
ID: 22669923
0
 
LVL 18

Expert Comment

by:sk_raja_raja
ID: 22669941
I am not comfortable doing the open file backup using script.... I would better suggest you to have a deep look in to the Netbackup and utlizise its own backup file agent... I am sure Netback supports customized backup script
0
 

Author Closing Comment

by:ExpertAssist
ID: 31504034
Great information! Thanks.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question