Task scheduler job is failing due to

16 views
Skip to first unread message

Srikant Patil

unread,
May 27, 2020, 9:01:51 AM5/27/20
to
Hi Folks,

I have created a powershell script to copy files over network using robocopy utility.

The script works fine manually without mapping a drive but it fails when i use task scheduler to run that job.

After mapping the drive the script started working but i don't want to map a drive.

Is there any other option to copy files over network using a specific user credentials?

Charlie Hoffpauir

unread,
May 27, 2020, 10:10:23 AM5/27/20
to
I have a task scheduled to back up my data overnight to a networked
NAS unit. It's a simple Robocopy script, and it works fine. Perhaps
the problem is you haven't set the task properly? The structure of the
Robocopy script is:
Robocopy B:\ \\NAS-name\home\GB\B-backup /MIR /R:1 /W:1 /A-:S /A-:H

(where home\GB is the location set up on the NAS)

repeated for each disk to be copied.
These are all included in a *.bat file, called from the task
scheduler.

Tom

unread,
May 28, 2020, 2:18:59 AM5/28/20
to
there should be no need to map a drive.
could you post your code so one could check what is going on.
please anonymize any personal or company related information.

Reply all
Reply to author
Forward
0 new messages