Solved

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

Posted on 2008-10-07
12
2,171 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Many admins will agree: WSUS is is a nice invention but using it on the client side when updating a newly installed computer is still time consuming as you have to do several reboots and furthermore, the procedure of installing updates, rebooting an…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
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…

759 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

20 Experts available now in Live!

Get 1:1 Help Now