Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XP task scheduler 2

Status
Not open for further replies.

PeterS

Technical User
Jun 1, 2001
18
0
0
US
I'm trying to use task scheduler to automate file transfer (using a batch file which calls xcopy) at night. The source is a mapped network drive and the destination a local hard disk. The batch file works normally when called from a command line or run from Explorer, but the scheduled task doesn't run. Any suggestions?

Thanks!
 
Dumb questions:
1) Is the computer on when it's supposed to be running this task?
2) Is it logged into the network, or whatever is necessary for the mapped network drive to be available?
3) Does the task show up when you bring up the Task Manager?

Jennifer Sigman
1/2 of the IT staff
 
Yes to all three. Not really dumb questions, since I've overlooked things that obvious on occasion, but in this case all those items are covered.
 
Hmmm... I'll have to think on that a few, I've done xcopy batch files in Windows 2K several times but not XP yet. If someone else can help, feel free to jump in. Jennifer Sigman
1/2 of the IT staff
 
I've had the exact same problem on NT... I ended up using a third party scheduling software.

I think the fix is to run the Schedule/Task Scheduler service as an account with administrator rights, rather than the (default) local system account.
 
PeterS,

I have a (backup) batch file scheduled to xcopy data to a CDRW daily in XP. It works well!
When I scheduled the file to run, I was prompted for (and enterd) my Administrator password.
If you were not prompted to enter this information, you may want to reschedule the batch file to run and see if you have to enter the information.
You can also double click on the scheduled program to bring up the properties.
In the task tab, there is a box for "Run as" (logged in user name) and a radio button to enter the password.

I hope this information helps.

-Brett
 
FosTech,

You are only copying files locally though, aren't you? (ie not over a network). I think the problem occurs because the local system account does not have permission to access any networked drives.
 
Have you considered that the drives may have autodisconnected in the night, while not in use, and so the scheduler may not be able to access the shared drive?
You can change the registry on:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
In here, change autodisconnect to 8 fs (ffffffff) in hex. This is the max.
Do this on the server that owns the share.
Plus, if you use a default Group Policy, there is a default autodisconnect feature there in Windows Setings\Security Settings\Local Policies\Security Options
Apparently, if this is Not Defined, the default is 15 minutes.

Will
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top