Solved

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

Posted on 2008-10-07
12
2,186 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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 125 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

832 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