Solved

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

Posted on 2008-10-07
12
2,177 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
 

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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

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.

Question has a verified solution.

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

Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now