Mark Minasi's Reader Forum
Mark Minasi's Reader Forum
Home | Profile | Register | Active Topics | Active Polls | Members | Search | FAQ | Minasi Forum RSS Feed
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 HALP! Questions on Windows and Windows Server
 Windows Server 2003
 windows schedular not working
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/09/2009 :  12:33:46 AM  Show Profile  Reply with Quote
Hi All
I am new to windows concepts.
I have created simple batch file to copy backup files from production server(window server 2003 Enterprice) to Dev Server(window server 2003 Developer) and scheduled it in Prod Server daily twice.
But when i see log showing
"Result: The task completed with an exit code of (4)."
or
"Result: The task completed with an exit code of (1).".
What does it mean?
How to analyze Exit codes.
and its working when i manually first connect to Dev from Prod in file share mode and runs the batch file.
plz. guide me.

Xenophane
Honorable But Hopeless Addict

Denmark
2775 Posts
Status: online

Posted - 11/09/2009 :  02:20:09 AM  Show Profile  Visit Xenophane's Homepage  Send Xenophane an ICQ Message  Reply with Quote
Here is a list of what exit codes mean

http://www.hiteksoftware.com/mize/Knowledge/articles/049.htm

SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>

You can read my blog at www.xipher.dk
Go to Top of Page

cj_berlin
Honorable But Hopeless Addict

Germany
3098 Posts
Status: offline

Posted - 11/09/2009 :  03:08:05 AM  Show Profile  Visit cj_berlin's Homepage  Look at the Skype address for cj_berlin  Reply with Quote
Most probably the security context the script is scheduled to run in haven't got access to remote server - OR you are using mapped drives in your script and the user account the script runs as doesn't map them in its login script.

Evgenij Smirnov
MISSION CRITICAL Business IT Services Ltd.

Revolutionising the PC desktop at a fixed rate (in German only):
PCohnePC.DE
Go to Top of Page

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/09/2009 :  03:43:02 AM  Show Profile  Reply with Quote
Thanks for ur reply.
How to trobleshoot it.
any ideas.
My script is as follows

xcopy "Source Machine" "\\DestinationIP\<drive>$\Folder" /d /y
Go to Top of Page

cj_berlin
Honorable But Hopeless Addict

Germany
3098 Posts
Status: offline

Posted - 11/09/2009 :  03:50:10 AM  Show Profile  Visit cj_berlin's Homepage  Look at the Skype address for cj_berlin  Reply with Quote
So you need to determine what user this script runs under and either change that to something that has write access to the destination share or give the account the script is scheduled as that access.

Evgenij Smirnov
MISSION CRITICAL Business IT Services Ltd.

Revolutionising the PC desktop at a fixed rate (in German only):
PCohnePC.DE
Go to Top of Page

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/09/2009 :  04:05:11 AM  Show Profile  Reply with Quote
Yes I am running the script under Administrator account who has all previlages.
Go to Top of Page

cj_berlin
Honorable But Hopeless Addict

Germany
3098 Posts
Status: offline

Posted - 11/09/2009 :  05:42:01 AM  Show Profile  Visit cj_berlin's Homepage  Look at the Skype address for cj_berlin  Reply with Quote
Can you redirect the output to a text file and see what xcopy's gotta say?

Evgenij Smirnov
MISSION CRITICAL Business IT Services Ltd.

Revolutionising the PC desktop at a fixed rate (in German only):
PCohnePC.DE
Go to Top of Page

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/12/2009 :  12:25:13 AM  Show Profile  Reply with Quote
I have tested my batch script in two different ways.
1.Initailly i ran without connecting to another server neither remotely nor file sharing mode then my script writes output as "0 files copied".
2.In this case first i connected to another machine via file sharing to specified directory from cmd prompt as "\\serverip\F$\MySecondaryBackupsFolder"
Then i ran the script of XCopy then all new files copied successfully.
I think in first case its not finding the secondary server direcory.
But as i made it as windows schedular everytime i cannot connect to secondary server and run the script.
Could you plz. guide me as i dont have windows knowledge much.
Thankx.
Go to Top of Page

Xenophane
Honorable But Hopeless Addict

Denmark
2775 Posts
Status: online

Posted - 11/12/2009 :  06:31:16 AM  Show Profile  Visit Xenophane's Homepage  Send Xenophane an ICQ Message  Reply with Quote
As CJ said, I think you need to check which account is running your scheduled job. You can change that under the settings of the scheduled task

SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>

You can read my blog at www.xipher.dk
Go to Top of Page

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/12/2009 :  06:40:44 AM  Show Profile  Reply with Quote
I am running under Administrator account only.
The same i mention in case 2 of above reply.
Go to Top of Page

Xenophane
Honorable But Hopeless Addict

Denmark
2775 Posts
Status: online

Posted - 11/12/2009 :  06:51:02 AM  Show Profile  Visit Xenophane's Homepage  Send Xenophane an ICQ Message  Reply with Quote
One thing you could try was to mount the share in your script..

Net Use x: \\\DestinationIP\<drive>$\Folder (Where x: is an available drive)


Then

xcopy "Source Machine" x: /d /y

SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>

You can read my blog at www.xipher.dk
Go to Top of Page

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/12/2009 :  07:19:22 AM  Show Profile  Reply with Quote
What is an Available drive.
Is it shared n/w drive created in local machine.
Go to Top of Page

Xenophane
Honorable But Hopeless Addict

Denmark
2775 Posts
Status: online

Posted - 11/12/2009 :  07:41:31 AM  Show Profile  Visit Xenophane's Homepage  Send Xenophane an ICQ Message  Reply with Quote
With available drive I meant a drive letter that is not allready in use. (You can see which drives are in use i "My Computer")

What do you mean by "Is it shared n/w drive created in local machine."

SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>

You can read my blog at www.xipher.dk
Go to Top of Page

learnwindows
Welcome Newcomer

7 Posts
Status: offline

Posted - 11/12/2009 :  08:22:46 AM  Show Profile  Reply with Quote
ThankQ.
It got worked as you specified.
you saved my day.
Thanks again.
Go to Top of Page

Xenophane
Honorable But Hopeless Addict

Denmark
2775 Posts
Status: online

Posted - 11/12/2009 :  09:13:03 AM  Show Profile  Visit Xenophane's Homepage  Send Xenophane an ICQ Message  Reply with Quote
No Problem, glad I could help...

SIG> George Bernard Shaw : The power of accurate observation is commonly called cynicism by those who have not got it. </SIG>

You can read my blog at www.xipher.dk
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Mark Minasi's Reader Forum © 2002-2009 Mark Minasi Go To Top Of Page
This page was generated in 0.2 seconds. Snitz Forums 2000