![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Windows NT/2000/2003 Server/2008 Server Find support for Windows NT/2000/2003 Server/2008 Server editions. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2009
Posts: 3
OS: w2k server
|
Scheduled Tasks
Is there a way to run a scheduled task, let's say a batch file consisting of xcopy from Server A to Server B (using net use in batch) when these servers are each in workgroup, no domain. Server A = w2k server, Server B = w2k3 server. The batch file runs ok from command line. Thanks!
|
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
TSF Enthusiast
Join Date: May 2008
Posts: 1,143
OS: XP SP3/Vista/7 Server 2K/2K3/2K8
|
Re: Scheduled Tasks
There is, depending on the OS. With most it will be in the control panel, scheduled tasks. Once in there, just create the event you need and have it run. I would ensure that your .bat file runs without error prior to scheduling it.
I did something similar using rsync for windows, and it replicated several shared directories from one server to a backup server. The client didn't want to go the route of a clustered server with shared storage so I came up with this way. There was also a log file created that allowed me to see what files were and weren't copied. I think it worked better than xcopy because xcopy will do a full copy all the time, whereas rsync will sync all the first time and then only changed thereafter. That effectively reduces the time for the backup. Heck, I even had the .bat file shutdown their mssql service running for their Act! program, had it backup the database directories, and restart the service. Has run flawless for more than a year.
__________________
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done. The inherent vice of capitalism is the uneven division of blessings, while the inherent virtue of socialism is the equal division of misery. Last edited by djaburg; 01-09-2009 at 07:38 PM. |
|
|
|
|
|
#3 (permalink) |
|
Registered User
|
Re: Scheduled Tasks
Go to start -> all programs -> accessories -> system tools -> scheduled tasks.
Also if your copying files from one computer to another over a network use robocopy instead of xcopy. It is a free utility from Microsoft that is basically the same as xcopy but with network support / reliability built in. |
|
|
|
|
|
#4 (permalink) |
|
TSF Enthusiast
Join Date: Aug 2006
Posts: 950
OS: OS2 Warp
|
Re: Scheduled Tasks
sure, just issue a "net use" command to map a drive (NET USE J: \\servername\share /USER:domainname\username password)
That will log you in and map a a drive (if needed) but you can also just use it toget you logged in and still use a UNC name. |
|
|
|
|
|
#5 (permalink) |
|
Registered User
Join Date: Jan 2009
Posts: 3
OS: w2k server
|
Re: Scheduled Tasks
For some reason, this does not work in Scheduled tasks, it runs fine manually when I run it from command prompt. Here is the bat file contents, very simple, but does not work. Now, the xcopy process takes over 2 hours on this. I noticed the scheduled tasks result is 0x0, which is ok and the log shows that it ran, but it did not. Any ideas?
net use f: \\192.168.1.101\f$ /user:server1\administrator password start "SQL COPY" /min xcopy "c:\program files\microsoft sql server\mssql\backup\*.*" f:\backups\backup09\*.* |
|
|
|
![]() |
| Thread Tools | |
|
|