Behavior:
The Export tool that writes to a network path works correctly when running it manually. If we create a Scheduled Task via Task Scheduler, nothing is written, and the error we find from the error log is the following;
"mscorlib Could not find a part of the path 'E:\DocuWare\Export Invoices'."
The Export tool that writes to a network path works correctly when running it manually. If we create a Scheduled Task via Task Scheduler, nothing is written, and the error we find from the error log is the following;
"mscorlib Could not find a part of the path 'E:\DocuWare\Export Invoices'."
Solution:
Please refer to the following best practices when using the Task Scheduler for processes that write to a mapped drive to ensure better performance.
Please refer to the following best practices when using the Task Scheduler for processes that write to a mapped drive to ensure better performance.
- Mapped drives are user-specific and only available when the user is logged in. If a task is set to run under a different account or when not logged in, the mapped drive may not be accessible. It's best practice to remap the drive to see whether this allows access to the Task.
- A more reliable method is to use a UNC path, which will ensure that the network location is accessible regardless of whether the user is logged in.
- If mapped drives are absolutely necessary, then incorporate scripts to run at the beginning and end of the process that will map and disconnect the drive. For example, a script as the following can be used;
net use K: \\Server\share /user:username password
[Command here]
net use K: /delete
KBA is applicable for both Cloud and On-premise Organizations.