Re: scheduled task can not access shared drive





"Pegasus (MVP)" wrote:


"powdered_toast_man" <powderedtoastman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:81D01B94-2218-45CA-99C3-8E2883898004@xxxxxxxxxxxxxxxx
This is actually on a Windows 2003 server but I didn't see it among the
options.

I've created a batch file on server A to generate a report and copy it to
a
shared drive on server B. When I log onto server A and run the batch file
it
works; when I use the task scheduler to run the batch it fails. A coworker
suggested using the unc path rather than the mapped drive letter
designation
but that didn't help - all that did was generate a "CMD does not support
UNC
paths as current directories" error message.

I have a hunch that the problem is because the shared drive is not
recognized unless the user physically logs onto the box. Is that the case
and
is there a way to work around this?

Let's have a look at your batch file!

What account do you use for the scheduled task? Does it have access
to the shared resource?

About newsgroups: There are several with the word "Server" in it, e.g.
"windows.server.general".


A domain level servce account is running the task; it does have access to
the resource. Again, when I actually remote desktop onto the server with the
service account id and run the batch file it works fine - it only fails as a
scheduled task. Perhaps I don't fully understand the difference between
physically logging onto a server and the way task scheduler "logs on" to run
the task but something tells me that's the difference and reason for failure.

As far as the batch file itself, it's very simple:
copy "C:\reports\daily_report" "Z:\transferred reports\daily_report"
Where "Z" is the mapped shared drive. As mentioned I also tried it with the
unc path of "\\servername\share\transferred reports\daily_report" but that
didn't do the trick either.
.



Relevant Pages

  • Re: back not backing up
    ... When you run ntbackup manually then you press certain buttons ... - Run this batch file from a Command Prompt. ... run the batch file via the Task Scheduler. ... lie in areas other than server management. ...
    (microsoft.public.windows.server.general)
  • Re: Automatic copying files
    ... > somebody put file to it, I want to another server move this file into its ... > This batch file run from command line works OK. ... > errors in task scheduler error log, ... > Best regards ...
    (microsoft.public.windows.server.general)
  • Automatic files copying
    ... I want to another server move this file into ... This batch file run from command line works OK. ... But batch doesn't run from "normel user" account. ... any errors in task scheduler error log, ...
    (microsoft.public.windows.server.security)
  • Re: SPBackup utility failing
    ... generates a batch file that, when run on a server running Windows SharePoint ... backs up changed site collections using the Stsadm.exe tool. ... >> Mike Walsh, Helsinki, Finland ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Access Denied Error -- Reading Text File in .BAT program
    ... without seeing the whole batch file I am unable to offer any further ... echo Start %date% %TimeMarker%>> c:\test.txt ... on the server console. ... It is strange the file disappears completely after using the NET FILE ...
    (microsoft.public.scripting.wsh)

Loading