Question about Microsoft Windows Server 2003 Enterprise Edition for PC

1 Answer

Windows 2003 Server Task Scheduler Exit Code (1)

I have a cmd file that is executed every morning at 2:59:59 in Windows 2003 Server Task Scheduler. It runs, taking about 20 minutes to complete its tasks. If I run it manually from the command line, it runs without error. The automated run in Task Scheduler, however, finishes with an Exit Code of (1).

The task list is fairly simple: I delete all files in about 12 folders on three network drives, and copy about 500 files from a production system into those same folders. The idea is to get the production system backed up to three network locations, so we always have yesterday's data available.

I've entered my own Active Directory credentials in the scheduler to ''backup as'' myself (admin), and following deletion, am using the UNC convention to copy out the files, following this format:

COPY CPU982ADMINADMINNEWACCTGPAYROLL*.ASC BHAM-ENG-DATASHAREGLOBALJJANSKYRBaseSandboxPAYROLL /V /Y

Here is the result with the error code:
''Backup RBase.job'' (BackupRBase.cmd)
Started 3/4/2009 3:00:00 AM
''Backup RBase.job'' (BackupRBase.cmd)
Finished 3/4/2009 3:20:23 AM
Result: The task completed with an exit code of (1).

You can see, it took 20 minutes and 23 seconds to run, so it IS doing something, but the error code concerns me. I'm finding little help in a google search.

Posted by on

  • 1 more comment 
  • Damon Gray
    Damon Gray Mar 05, 2009

    frcs,

    No joy. I walked through the file line by line. These are just simple "DOS" copy commands - copy path\filename newpath\filename /v /y

    I found no anomolies. It all looks very uniform since there are scores of identical lines row after row, with the only difference being the filename extensions.

    I also tried changing the UNC path to the mapped drive name. Last night's run still resulted in an exit code of (1).

    Any thoughts on where to take this?




  • Damon Gray
    Damon Gray Mar 06, 2009

    Hmmmmmm, that's a heck of a thought. Let me change it to an 8.3 filename and see if that fixes the issue. I'll letcha know.




  • Damon Gray
    Damon Gray Mar 10, 2009

    Still no joy. So, today, I meticulously walked through lines of this file. I did find one whack "/' that was supposed to be an escape character, but was butted up against the end of the path statement, so it may have been the cause of the issue. The process will run again at 3AM tomorrow. I'll post the results here.




×

Ad

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Genius:

    An expert who has answered 1,000 questions.

  • Master
  • 1,605 Answers

The exit code of 1 or 0x1: Incorrect function called or unknown function called.
check your backupRBase.cmd file. one of the URL or function need to be modify.

Posted on Mar 04, 2009

  • Frank
    Frank Mar 05, 2009

    the error code shouldn't create any problem, since you already running the file.

    the only suggestion I have is to shorten the file name. I see the file name is rather long that may be only thing that is causing the error. The original DOS files name is 8.3 (8 character with 3 ext.). Windows now accepts 32bits, but since you are running DOS file command. I suggest you cut the file name shorter.

  • Frank
    Frank Mar 06, 2009

    it doesn't have to be 8.3, it can be any thing. Just shorter than what you have now.

×

Ad

2 Suggested Answers

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
A 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
The service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
Good luck!

Posted on Jan 02, 2017

Ad
  • 193 Answers

SOURCE: Windows 2003 Server Task Scheduler Exit Code (1)

return 1 does not necessarily mean that it didn't work, it just means that it ended under unusual circumstances. sometimes using a task scheduler has that effect. as long as the files end up where they are supposed to go i wouldn't worry about it.

Posted on Aug 14, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

Tip

How to bypass Vista's UAC using Task Scheduler and Tweak UAC


The UAC function on Windows Vista is a good idea however several applications like CCleaner and HostMan will not autostart unless you follow the instructions included in my archive file download it HERE from my SkyDrive

I have included an elevated command prompt and examples of the XML files that you can import into Task Scheduler and modify to allow the mentioned applications to run, also included is my PromptOnSecureDesktop reg tweak if needed for you system


on May 03, 2010 | Microsoft Windows Vista Ultimate Edition

Tip

How to create a daily enhanced Disk Cleanup task in Windows 7


So you want your Windows 7 Operating System to perform a daily enhanced Disk Cleanup? Well, so do I. So lets get this party started.

Step 1. Click on Start and then click Control Panel.

Step 2. In Control Panel change the View to Small Icons.

Step 3. Now click on Administrative Tools.

Step 4. Now double-click on Task Scheduler.

Step 5. On the right hand side of the Task Scheduler window, click on Create Task.

Step 6. In the Name field, you can type "I love crickets", but to make our task easier to find and manage, I would suggest you label it for what it is, ie., Daily Enhanced Disk Cleanup.

Step 7. In the Security Options area, you are asked to use the default account, which is the account you are currently logged in with. If your account is not an Administrator account you will not be able to create this task. Also, if your account does not have a password, you will not be able to run this account.

Step 8. We want to run this task while we are not actively using this machine, so let's select the "Run whether user is logged on or not" radio button.

Step 9. Leave the "Do not store password" checkbox unchecked.

Step 10. Select the "Run with highest priveledges" checkbox.

Step 11. Leave the Hidden box unchecked as well. We wouldn't want to make it harder for us to find the task if we have to edit it.

Step 12. Click on the Triggers tab.

Step 13. Click the New button.

Step 14. For Begin the task. select "On a Schedule".

Step 15. Select Daily to Recur every 1 days.

Step 16. Change the Start time to 2:00 AM

Step 17. Now check the Enabled checkbox then hit OK.

Step 18. Click on the Actions Tab.

Step 19. Click the New button.

Step 20. In the action dropdown menu, select "Start a program".

Step 21. In Program/script, type C:\Windows\System32\cleanmgr.exe

Step 22. For Add Arguments, type in /sagerun:1
(Please note: To utilize the /sagerun:1 argument, you must follow the steps outlined in my previous article located here.)

Step 23. Hit OK.

Step 24. Click on the Conditions tab.

Step 25. Select the "Wake this computer to run this task" checkbox.

Step 26. Hit OK to close the Create Task UI. You will be prompted for your password or the password you used to create the task.

Step 27. Now test your task.

Step 28. In the task Scheduler UI, click in Task Scheduler Library in the top left hand corner.

Step 29. Right-click on the task you just created and hit run. Your task should run silently in the background. After a few moments, you can click on the History tab and check the status of the task as it stands right now. You will either see running or completed successfully.

Though this task was built using Windows 7, the same steps apply to Windows Vista.

on May 01, 2010 | Computers & Internet

1 Answer

I'm running Windows 7 on a Dell laptop. It has not completed one backup since I installed Toshiba 500GB portable drive which came with backup software installed on it. While trying to run the backup...


This issue needs to go back to Newtech. They can guide you through the issue. Is the external drive LARGE enough? Windows backup takes huge amounts of room. I suggest Handy Backup Pro, it can pull backup across networks, and push the data to drives and ONLINE locations.

Jan 21, 2011 | Newtech Tech InfoSystems NTI Backup Now EZ...

1 Answer

Printer not printing.


Follow these steps to resolve the issue. Windows XP
  1. On the Windows taskbar, click Start, and then click All Programs.
  2. Click Accessories, and then click System Tools.
  3. Click Scheduled Tasks. The Scheduled Tasks window opens.
  4. Under Name, click and delete any task that starts with Webreg (for example, Webreg 20031218075500).
  5. Close the Scheduled Tasks window.
Windows Vista
  1. On the Windows taskbar, click the Windows icon (c01319360.gif).
  2. Right-click Computer, and then click Manage. The Computer Management window opens.
  3. In the left pane, click the arrow next to Task Scheduler, and then click Task Scheduler Library.
  4. Under Name, find and click any task that starts with Webreg (for example, Webreg 20031218075500).
  5. In the Actions pane, click Delete.
  6. In the Confirm delete dialog box, click Yes.
  7. Close the Computer Management window.
Windows 7
  1. On the Windows taskbar, click the Windows icon (c01319360.gif).
  2. Right-click Computer, and then click Manage. The Computer Management window opens.
  3. In the left pane, click the arrow next to Task Scheduler, and then click Task Scheduler Library.
  4. Under Name, find and click any task that starts with Webreg (for example, Webreg 20031218075500).
  5. In the Actions pane, click Delete.
  6. In the Task Scheduler dialog box, click Yes.
  7. Close the Computer Management window.

Jul 19, 2010 | HP PSC 1510 All-In-One InkJet Printer

1 Answer

My tune up utility says my prefetch folder is gone and it is important for my laptop to increase the start up..how will i solve this problem?..i didnt delete anythin in my laptop so i was wondering how...


1. Make sure that the task scheduler is enabled. If you are un-sure, go to Start/Control Panel/Administrative Tools/ Click on Services/ Then in the list of services make sure the Task Scheduler is enabled & restart the service by clicking on Start. Close the Services Folder & go back to desktop.

2. Then go to START/RUN/ and TYPE IN cmd (without the quotes) CLICK OK. This will bring up the DOS Command screen.

3. You will need to copy and paste this entry in at the flashing cursor
 rundll32.exe advapi32.dll,ProcessIdleTasks (without quotes) and press ENTER.

4. Now reboot three times and your Prefetch folder will be rebuilt. (It takes 3 reboots for the prefetch folder to work out what it needs)

Feb 06, 2010 | Microsoft Windows Vista Home Premium with...

1 Answer

Windows task scheduler and Active Directory


M31.imaut enter my computer.Please how i remove it.

Jun 19, 2009 | Computers & Internet

2 Answers

Windows 2003 Server Task Scheduler Exit Code (1)


Have you tried to use robocopy.exe instead of copy? Robocopy have a logging option and is a lot more powerful. It's available in Windows Server 2003 Resource Kit Tools.

May 26, 2009 | Microsoft Windows Server 2003 Enterprise...

1 Answer

Windows Data base server


Hi
I did not understand fully why you set the service to manul?
If you must have it manual then you have to find some workaaround solution .
there are two slutions i can think of :
1. create script that run as scheduale task every x minutes the script will check if oracle instance is down and if is down and no backup running at the moment will restart it .
2. whenever instance is down the schedule task that check if instance is up or not will send you some kind of alert (email, SMS) and you will decide if you want to bring the db back up .

hope it helps
Good Luck

Apr 30, 2009 | B&W ASW1000 Speaker

1 Answer

Ntbackup causing server to crash and reboot


Try to monitor the memmory and processor usage in task manager  performance tab.Check you have sufficient memmory sixe in your server.

Oct 17, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Computers & Internet Logo

6,676 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2986 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18424 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...