Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2008-10-07
12
Medium Priority
?
2,307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Learn about cloud computing and its benefits for small business owners.
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). …
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…

636 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